activerecord-hstore_properties 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -95,7 +95,7 @@ end
95
95
  c = Category.last
96
96
  c.caption = "Nice product" #this will save 'Nice product' into caption_en property
97
97
  c.save
98
- c.caption #this will retrieve 'Nice product' from caption_en property
98
+ c.caption_property #this will retrieve 'Nice product' from caption_en property
99
99
  ```
100
100
 
101
101
  You can always enforce in which locale you would like to store property, by suffixing it with any locale code available in `I18n.available_locales`
@@ -108,11 +108,11 @@ c.caption_nb_no = "Fint produkt"
108
108
 
109
109
  c.save
110
110
 
111
- c.caption #=> "Nice product"
111
+ c.caption_property #=> "Nice product"
112
112
  c.caption_nb_no #=> "Fint produkt"
113
113
 
114
114
  I18n.locale = :'nb-NO'
115
- c.caption #=> "Fint produkt"
115
+ c.caption_property #=> "Fint produkt"
116
116
  ```
117
117
 
118
118
  ### Updating through forms
@@ -7,7 +7,7 @@ module ActiveRecord
7
7
  properties[property.name.to_s]
8
8
  end
9
9
 
10
- add_property_accessor '=' do |property, *args|
10
+ add_property_accessor '=', '_property=' do |property, *args|
11
11
  properties_will_change!
12
12
  properties[property.name] = args.shift
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module Activerecord
2
2
  module HstoreProperties
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-hstore_properties
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-16 00:00:00.000000000 Z
12
+ date: 2013-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport