padrino/padrino-framework — Issue #703: url helper with entity as parameter is broken
Author: pirj
Created: 2011-10-15 12:17:06+00:00
State: open

App.controllers :externals do
put :update, :with => :id do
...
end
end

padrino-0.10.0:

exteral = External.first
url(:externals, :update, external) # => '/externals/update/1

padrino-0.10.5:

exteral = External.first
url(:externals, :update, external) # => '/externals/update/%23%3CExternal:0x8d44e48%3E

Is that a feature? I used to:

-form_for external, url(:externals, :update, external), :method => :put, :class => :form do |f|

Currently as a workaround:

-form_for external, url(:externals, :update, external.id), :method => :put, :class => :form do |f|