default_value_for 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/default_value_for.gemspec +1 -1
- data/init.rb +1 -2
- data/lib/default_value_for.rb +7 -2
- metadata +4 -4
data/default_value_for.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{default_value_for}
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.4"
|
4
4
|
s.summary = %q{Provides a way to specify default values for ActiveRecord models}
|
5
5
|
s.description = %q{The default_value_for plugin allows one to define default values for ActiveRecord models in a declarative manner}
|
6
6
|
s.email = %q{info@phusion.nl}
|
data/init.rb
CHANGED
data/lib/default_value_for.rb
CHANGED
@@ -18,8 +18,6 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
require 'default_value_for/railtie' if defined?(Rails::Railtie)
|
22
|
-
|
23
21
|
module DefaultValueFor
|
24
22
|
class NormalValueContainer
|
25
23
|
def initialize(value)
|
@@ -105,3 +103,10 @@ module DefaultValueFor
|
|
105
103
|
end
|
106
104
|
end
|
107
105
|
end
|
106
|
+
|
107
|
+
if defined?(Rails::Railtie)
|
108
|
+
require 'default_value_for/railtie'
|
109
|
+
else
|
110
|
+
# Rails 2 initialization
|
111
|
+
ActiveRecord::Base.extend(DefaultValueFor::ClassMethods)
|
112
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: default_value_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Hongli Lai
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-22 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|