ruby on rails 3 - path helper for form_for tag with url options generates wrong url -
i using form_for helper url option this:
<%= form_for @security_user, url: security_users_manage_securities_path(@security_user), html: { class: 'default', method: :put, id: 'security-default-form' } |f| %>
but
security_users_manage_securities_path(@security_user)
returns me following string:
/security_users_manage_securities.105
when need following one:
/security_users_manage_securities/105
has un idea why id of @security_user parameter concatenated '.' instead '/'?
try use helper in singular mode, e.g.
security_users_manage_security_path(@security_user)
this should generate
/security_users_manage_securities/105
plural used when want url list , shouldn't pass params:
security_users_manage_securities_path
returns:
/security_users_manage_securities
Comments
Post a Comment