activerecord-hstore_properties 0.0.1.alpha → 0.0.2.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -1
- data/activerecord-hstore_properties.gemspec +3 -3
- data/lib/active_record/properties/boolean_property.rb +5 -5
- data/lib/active_record/properties/counter_property.rb +4 -4
- data/lib/active_record/properties/extensions/booleans.rb +1 -1
- data/lib/active_record/properties/number_property.rb +4 -4
- data/lib/active_record/properties/string_property.rb +4 -4
- data/lib/activerecord-hstore_properties/version.rb +1 -1
- metadata +5 -4
data/README.textile
CHANGED
@@ -19,7 +19,7 @@ Apply your migration
|
|
19
19
|
Finally, describe your properties in your model file
|
20
20
|
|
21
21
|
bc. class User < ActiveRecord::Base
|
22
|
-
include ActiveRecord::
|
22
|
+
include ActiveRecord::HstoreProperties
|
23
23
|
properties 'third_name',
|
24
24
|
'some_cool_feature' => :boolean,
|
25
25
|
'comments' => :counter,
|
@@ -7,10 +7,10 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = "activerecord-hstore_properties"
|
8
8
|
gem.version = Activerecord::HstoreProperties::VERSION
|
9
9
|
gem.authors = ["stevo"]
|
10
|
-
gem.email = ["blazej.kosmowski@
|
11
|
-
gem.homepage = "https://github.com
|
10
|
+
gem.email = ["blazej.kosmowski@selleo.com"]
|
11
|
+
gem.homepage = "https://github.com/stevo/activerecord-hstore_properties"
|
12
12
|
gem.summary = "Facilitate defining and retrieving information from hstore column"
|
13
|
-
gem.description = ""
|
13
|
+
gem.description = "Allows to describe field names that will be stored within hstore column together with their types. Data can then be retrieved with a set of helpful getters."
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module ActiveRecord
|
2
2
|
module Properties
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
3
|
+
class BooleanProperty < Base
|
4
|
+
def formtastic_options
|
5
|
+
{:as => :boolean, :checked_value => 'true', :unchecked_value => 'false'}
|
7
6
|
end
|
8
7
|
end
|
9
|
-
end
|
8
|
+
end
|
9
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module ActiveRecord
|
2
2
|
module Properties
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
3
|
+
class CounterProperty < Base
|
4
|
+
def formtastic_options
|
5
|
+
{:as => :number, :disabled => true}
|
7
6
|
end
|
8
7
|
end
|
9
8
|
end
|
9
|
+
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.
|
4
|
+
version: 0.0.2.alpha
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -27,9 +27,10 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
-
description:
|
30
|
+
description: Allows to describe field names that will be stored within hstore column
|
31
|
+
together with their types. Data can then be retrieved with a set of helpful getters.
|
31
32
|
email:
|
32
|
-
-
|
33
|
+
- blazej.kosmowski@selleo.com
|
33
34
|
executables: []
|
34
35
|
extensions: []
|
35
36
|
extra_rdoc_files: []
|
@@ -54,7 +55,7 @@ files:
|
|
54
55
|
- lib/activerecord-hstore_properties/version.rb
|
55
56
|
- spec/spec_helper.rb
|
56
57
|
- test/test_helper.rb
|
57
|
-
homepage: https://github.com
|
58
|
+
homepage: https://github.com/stevo/activerecord-hstore_properties
|
58
59
|
licenses: []
|
59
60
|
post_install_message:
|
60
61
|
rdoc_options: []
|