Skip to content

Commit

Permalink
Add module_eval missing file_name and line_number args
Browse files Browse the repository at this point in the history
[#4712 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
dolzenko authored and josevalim committed Jun 27, 2010
1 parent 0e9190c commit 56b35af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/lib/active_record/autosave_association.rb
Expand Up @@ -146,12 +146,12 @@ module ClassMethods
# add_autosave_association_callbacks(reflect_on_association(name))
# end
ASSOCIATION_TYPES.each do |type|
module_eval %{
module_eval <<-CODE, __FILE__, __LINE__ + 1
def #{type}(name, options = {})
super
add_autosave_association_callbacks(reflect_on_association(name))
end
}
CODE
end

# Adds a validate and save callback for the association as specified by
Expand Down

0 comments on commit 56b35af

Please sign in to comment.