objectreload-simple_enumerations 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
module Wijet
|
1
|
+
module Wijet
|
2
2
|
module FormHelper
|
3
3
|
def select_enumeration(method)
|
4
4
|
@template.select_tag "#{@object_name}[#{method}]",
|
5
|
-
@template.options_from_collection_for_select(Enumeration[method], :to_s, :to_s , @object.send(method).to_s)
|
5
|
+
@template.options_from_collection_for_select(Wijet::SimpleEnumerations::EnumerationString::Enumeration[method], :to_s, :to_s , @object.send(method).to_s)
|
6
6
|
end
|
7
7
|
end
|
8
8
|
end
|
@@ -12,7 +12,7 @@ module Wijet
|
|
12
12
|
|
13
13
|
define_method("#{name}=") do |value|
|
14
14
|
value = value.to_s
|
15
|
-
unless Enumeration[name].include?(value) or value.blank?
|
15
|
+
unless EnumerationString::Enumeration[name].include?(value) or value.blank?
|
16
16
|
raise ArgumentError, "'#{value}' is not a value of enumeration '#{name}'"
|
17
17
|
end
|
18
18
|
write_attribute(name, value)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{objectreload-simple_enumerations}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mariusz Pietrzyk", "Mateusz Drozdzynski"]
|