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.
|
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.
|
111
|
+
c.caption_property #=> "Nice product"
|
112
112
|
c.caption_nb_no #=> "Fint produkt"
|
113
113
|
|
114
114
|
I18n.locale = :'nb-NO'
|
115
|
-
c.
|
115
|
+
c.caption_property #=> "Fint produkt"
|
116
116
|
```
|
117
117
|
|
118
118
|
### Updating through forms
|
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.
|
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-
|
12
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|