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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 282257eddb6cfc484da72c8276125604427e90eb
4
- data.tar.gz: 7a1a46a0970e65a5af2d2f831acd66fcc2ad0334
3
+ metadata.gz: 73d06cb0b6e812933dcd46d103666e89bed0d67e
4
+ data.tar.gz: ba28f409914d47bb0bbf684e31f001e2386984d4
5
5
  SHA512:
6
- metadata.gz: 34528db6afd52cad97429a39f8251178498a3df1a11d12da9972ddb44068b8e28b241fc920956b896de268c8ff0b6daa654b3947be89500090e0be2378804e05
7
- data.tar.gz: 136bdc3c7841f0b5b47e9a628c8106d04a43171144d1a0c4380c71bab79a16654d811813d3b52db8af1cc33f0140486704f030adc3d586fc4e7e019964d5e89f
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, dependent: :destroy, class_name: 'ActsAsSeoFriendly::SeoDatum', as: :datable
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, update_only: true, allow_destroy: true
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
@@ -1,3 +1,3 @@
1
1
  module ActsAsSeoFriendly
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
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.2
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-12 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails