diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-28 20:00:29 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-28 20:00:29 +0000 |
commit | d6c2285e31cbc7150cf99ff3a537eddbdb50fb29 (patch) | |
tree | 785f0c7ad566a09b9bc558854b4a5d43ae86ed46 /actionpack/lib/action_controller/polymorphic_routes.rb | |
parent | aaea12c497ca86a86fbda8409c226630ade22f89 (diff) | |
parent | a2270ef2594b97891994848138614657363f2806 (diff) | |
download | rails-d6c2285e31cbc7150cf99ff3a537eddbdb50fb29.tar.gz rails-d6c2285e31cbc7150cf99ff3a537eddbdb50fb29.tar.bz2 rails-d6c2285e31cbc7150cf99ff3a537eddbdb50fb29.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack/lib/action_controller/polymorphic_routes.rb')
-rw-r--r-- | actionpack/lib/action_controller/polymorphic_routes.rb | 18 |
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 |