aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/polymorphic_routes.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2008-12-28 19:48:05 +0000
committerPratik Naik <pratiknaik@gmail.com>2008-12-28 19:49:28 +0000
commita2270ef2594b97891994848138614657363f2806 (patch)
tree29962a36c4eb70272df2665db2b28d5b3ad15b99 /actionpack/lib/action_controller/polymorphic_routes.rb
parent1fb275541a58e6a2100261c6117e96e6c014cc6c (diff)
downloadrails-a2270ef2594b97891994848138614657363f2806.tar.gz
rails-a2270ef2594b97891994848138614657363f2806.tar.bz2
rails-a2270ef2594b97891994848138614657363f2806.zip
Inline code comments for class_eval/module_eval [#1657 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller/polymorphic_routes.rb')
-rw-r--r--actionpack/lib/action_controller/polymorphic_routes.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/polymorphic_routes.rb b/actionpack/lib/action_controller/polymorphic_routes.rb
index dce50c6c3b..924d1aa6bd 100644
--- a/actionpack/lib/action_controller/polymorphic_routes.rb
+++ b/actionpack/lib/action_controller/polymorphic_routes.rb
@@ -118,13 +118,17 @@ module ActionController
%w(edit new).each do |action|
module_eval <<-EOT, __FILE__, __LINE__
- def #{action}_polymorphic_url(record_or_hash, options = {})
- polymorphic_url(record_or_hash, options.merge(:action => "#{action}"))
- end
-
- def #{action}_polymorphic_path(record_or_hash, options = {})
- polymorphic_url(record_or_hash, options.merge(:action => "#{action}", :routing_type => :path))
- end
+ 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,
+ options.merge(:action => "#{action}")) # options.merge(:action => "edit"))
+ end # end
+ #
+ def #{action}_polymorphic_path(record_or_hash, options = {}) # def edit_polymorphic_path(record_or_hash, options = {})
+ polymorphic_url( # polymorphic_url(
+ record_or_hash, # record_or_hash,
+ options.merge(:action => "#{action}", :routing_type => :path)) # options.merge(:action => "edit", :routing_type => :path))
+ end # end
EOT
end