objectreload-simple_enumerations 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 3
4
+ :patch: 4
5
5
  :build:
@@ -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
@@ -1,5 +1,5 @@
1
1
  class Symbol
2
2
  def ==(object)
3
- object.kind_of?(Enumeration) ? object == self : super
3
+ object.kind_of?(Wijet::SimpleEnumerations::EnumerationString::Enumeration) ? object == self : super
4
4
  end
5
5
  end
@@ -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.3"
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mariusz Pietrzyk