objectreload-simple_enumerations 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml
CHANGED
@@ -2,11 +2,12 @@ module Wijet
|
|
2
2
|
module SimpleEnumerations
|
3
3
|
def self.included(base)
|
4
4
|
base.extend ClassMethods
|
5
|
-
EnumerationString::Enumeration.setup
|
6
5
|
end
|
7
6
|
|
8
7
|
module ClassMethods
|
9
8
|
def has_enumerated(name)
|
9
|
+
EnumerationString::Enumeration.setup
|
10
|
+
|
10
11
|
name = name.to_s
|
11
12
|
|
12
13
|
define_method("#{name}=") do |value|
|
@@ -55,5 +56,3 @@ module Wijet
|
|
55
56
|
end
|
56
57
|
end
|
57
58
|
end
|
58
|
-
|
59
|
-
include Wijet::SimpleEnumerations::EnumerationString
|
@@ -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.4"
|
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"]
|
data/rails/init.rb
CHANGED
@@ -2,6 +2,7 @@ if File.exists?(File.join(RAILS_ROOT, 'config', 'enumerations.yml'))
|
|
2
2
|
require 'simple_enumerations/simple_enumerations'
|
3
3
|
require 'simple_enumerations/symbol_extension'
|
4
4
|
require 'simple_enumerations/form_helper'
|
5
|
+
|
5
6
|
ActiveRecord::Base.send(:include, Wijet::SimpleEnumerations)
|
6
7
|
ActionView::Helpers::FormBuilder.send(:include, Wijet::FormHelper)
|
7
8
|
end
|