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.
@@ -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"
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
@@ -18,5 +18,4 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- # Rails 2 initialization
22
- ActiveRecord::Base.extend(DefaultValueFor::ClassMethods)
21
+ require 'default_value_for'
@@ -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: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
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 00:00:00 +02:00
18
+ date: 2011-07-22 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21