acts_as_lookup 0.0.2 → 0.0.3
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/acts_as_lookup.gemspec +2 -2
- data/lib/acts_as_lookup.rb +3 -1
- metadata +2 -2
data/acts_as_lookup.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{acts_as_lookup}
|
|
8
|
-
s.version = "0.0.
|
|
8
|
+
s.version = "0.0.3"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Brian Percival"]
|
|
12
|
-
s.date = %q{2010-04
|
|
12
|
+
s.date = %q{2010-05-04}
|
|
13
13
|
s.description = %q{Provides an easy means for creating models that act like enumerations or lookup
|
|
14
14
|
tables. You can specify the lookup values in your Rails models and can lazily
|
|
15
15
|
push these to the associated db tables (or not). Also dynamically adds helpful
|
data/lib/acts_as_lookup.rb
CHANGED
|
@@ -196,7 +196,9 @@ if defined?(ActiveRecord)
|
|
|
196
196
|
# double-class loading problems that arise in rails: see for example
|
|
197
197
|
# https://rails.lighthouseapp.com/projects/8994/tickets/1339
|
|
198
198
|
# it may create other problems though, so be careful....
|
|
199
|
-
|
|
199
|
+
if !Object.const_defined?(class_name)
|
|
200
|
+
require File.join(RAILS_ROOT, 'app', 'models', class_name.underscore)
|
|
201
|
+
end
|
|
200
202
|
|
|
201
203
|
# this is inspired/borrowed from Rapleaf's has_rap_enum
|
|
202
204
|
klass = Kernel.const_get(class_name)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts_as_lookup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Percival
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2010-04
|
|
12
|
+
date: 2010-05-04 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|