acts_as_seo_friendly 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acts_as_seo_friendly/datable.rb +8 -2
- data/lib/acts_as_seo_friendly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73d06cb0b6e812933dcd46d103666e89bed0d67e
|
4
|
+
data.tar.gz: ba28f409914d47bb0bbf684e31f001e2386984d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 572a613625b3b199b61c2b05da9a67f92740d8ac7a83487942adc2cf731fa4d26518df68800622bf63d7ebf945648506faf0f2dc2a0401e8d89827ce6880096e
|
7
|
+
data.tar.gz: 82518f6a81dca05dc8331dee7313eec6c01acb4fe090f5e3b7fb2b5cd7722b4c3ea5a6b1a14c909738afaed1c4a6ba58c378f3e68fd3c6fafe1127ef4066f19e
|
@@ -7,10 +7,16 @@ module ActsAsSeoFriendly
|
|
7
7
|
def acts_as_seo_friendly(format_attribute: :title)
|
8
8
|
class_eval do
|
9
9
|
# Define association
|
10
|
-
has_one :seo_datum,
|
10
|
+
has_one :seo_datum,
|
11
|
+
as: :datable,
|
12
|
+
class_name: 'ActsAsSeoFriendly::SeoDatum',
|
13
|
+
dependent: :destroy
|
11
14
|
|
12
15
|
# Allow to create or update seo_datum as nested form
|
13
|
-
accepts_nested_attributes_for :seo_datum,
|
16
|
+
accepts_nested_attributes_for :seo_datum,
|
17
|
+
reject_if: :all_blank,
|
18
|
+
update_only: true,
|
19
|
+
allow_destroy: true
|
14
20
|
|
15
21
|
def self.seo_friendly?
|
16
22
|
true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_seo_friendly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timur Khafizov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|