aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/configuration.rb
diff options
context:
space:
mode:
authortwinturbo <me@broadcastingadam.com>2012-04-28 22:33:11 -0700
committertwinturbo <me@broadcastingadam.com>2012-04-28 22:33:11 -0700
commitd7532c189f26e008fc6ef50336ed5e8168b8221c (patch)
tree681436aa5d80ed5e4c9a867ccc891eab6852f124 /activemodel/lib/active_model/configuration.rb
parent2c136ae0543ea53dcb3a3ef9372b216b54d66172 (diff)
parent6659252d9f0e6d77bee268adf587e03cfeb8f9ad (diff)
downloadrails-d7532c189f26e008fc6ef50336ed5e8168b8221c.tar.gz
rails-d7532c189f26e008fc6ef50336ed5e8168b8221c.tar.bz2
rails-d7532c189f26e008fc6ef50336ed5e8168b8221c.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/lib/active_model/configuration.rb')
-rw-r--r--activemodel/lib/active_model/configuration.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/configuration.rb b/activemodel/lib/active_model/configuration.rb
index 1757c12ebf..ba5a6a2075 100644
--- a/activemodel/lib/active_model/configuration.rb
+++ b/activemodel/lib/active_model/configuration.rb
@@ -95,7 +95,7 @@ module ActiveModel
end
def define
- host.singleton_class.class_eval <<-CODE, __FILE__, __LINE__
+ host.singleton_class.class_eval <<-CODE, __FILE__, __LINE__ + 1
attr_accessor :#{name}
def #{name}?; !!#{name}; end
CODE
@@ -107,7 +107,7 @@ module ActiveModel
define_method("#{name}?") { !!send(name) }
end
- host.class_eval <<-CODE
+ host.class_eval <<-CODE, __FILE__, __LINE__ + 1
def #{name}; defined?(@#{name}) ? @#{name} : self.class.#{name}; end
def #{name}?; !!#{name}; end
CODE
@@ -117,7 +117,7 @@ module ActiveModel
define_method("#{name}=") { |val| host.send("#{name}=", val) }
end
else
- class_methods.class_eval <<-CODE, __FILE__, __LINE__
+ class_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
def #{name}=(val)
singleton_class.class_eval do
remove_possible_method(:#{name})