aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-04-09 15:56:50 -0300
committerJosé Valim <jose.valim@gmail.com>2010-04-09 21:28:49 +0200
commit13e00ce6064fd1ce143071e3531e65f64047b013 (patch)
tree926d6d212b926d84432a71cb73814fe437d42655 /actionpack/lib
parent8b2266a8dada979d72ff6eda4349a24be3b630eb (diff)
downloadrails-13e00ce6064fd1ce143071e3531e65f64047b013.tar.gz
rails-13e00ce6064fd1ce143071e3531e65f64047b013.tar.bz2
rails-13e00ce6064fd1ce143071e3531e65f64047b013.zip
fix stack trace lines on class_eval
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/polymorphic_routes.rb2
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/polymorphic_routes.rb b/actionpack/lib/action_controller/polymorphic_routes.rb
index ae363e300c..7f2eb4306b 100644
--- a/actionpack/lib/action_controller/polymorphic_routes.rb
+++ b/actionpack/lib/action_controller/polymorphic_routes.rb
@@ -120,7 +120,7 @@ module ActionController
end
%w(edit new).each do |action|
- module_eval <<-EOT, __FILE__, __LINE__
+ module_eval <<-EOT, __FILE__, __LINE__ + 1
def #{action}_polymorphic_url(record_or_hash, options = {}) # def edit_polymorphic_url(record_or_hash, options = {})
polymorphic_url( # polymorphic_url(
record_or_hash, # record_or_hash,
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index fc02d959d4..c0e84ce225 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1105,7 +1105,7 @@ module ActionView
end
(field_helpers - %w(label check_box radio_button fields_for hidden_field)).each do |selector|
- src, file, line = <<-end_src, __FILE__, __LINE__ + 1
+ src, line = <<-end_src, __LINE__ + 1
def #{selector}(method, options = {}) # def text_field(method, options = {})
@template.send( # @template.send(
#{selector.inspect}, # "text_field",
@@ -1114,7 +1114,7 @@ module ActionView
objectify_options(options)) # objectify_options(options))
end # end
end_src
- class_eval src, file, line
+ class_eval src, __FILE__, line
end
def fields_for(record_or_name_or_array, *args, &block)