Permalink
Browse files

Ruby 1.9.2: implicit argument passing of super from method defined by…

… define_method() is not supported
  • Loading branch information...
1 parent 019ed5a commit 12c271d1d297203a0cb4c09ef6da5be9954e87b6 @jeremy jeremy committed Aug 8, 2009
Showing with 1 addition and 3 deletions.
  1. +1 −3 actionpack/lib/action_view/helpers/active_model_helper.rb
@@ -278,9 +278,7 @@ def to_tag(options = {})
end
%w(tag content_tag to_date_select_tag to_datetime_select_tag to_time_select_tag).each do |meth|
- define_method meth do |*|
- error_wrapping(super)
- end
+ module_eval "def #{meth}(*) error_wrapping(super) end"
end
def error_wrapping(html_tag)

0 comments on commit 12c271d

Please sign in to comment.