You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
I used the nifty:scaffold to generate a scaffold for my pre-existing Media model.
The scaffold generated the following paths (amongst others) as part of the scaffold,
edit_media_path
new_media_path
This caused a NameError and when I checked rake routes, I discovered that the RESTful resource routing had defined them as,
edit_medium_path
new_medium_path
From my explorations, it seems that Rails routing creates these paths based on the classify method but that the Nifty scaffolding uses something else.
This may be a problem in Rails itself too because the form_for method does not correctly identify the appropriate paths either when using the short form (as defined in http://guides.rubyonrails.org/form_helpers.html#relying-on-record-identification), but I would appreciate it if other more knowledgeable people could confirm that this is indeed a real issue (and that I'm not just forgetting something)
I ended up not only having to modify the paths of the scaffold but also have to add conditional code to the forms to assign the appropriate path and method.
The text was updated successfully, but these errors were encountered:
I used the nifty:scaffold to generate a scaffold for my pre-existing Media model.
The scaffold generated the following paths (amongst others) as part of the scaffold,
This caused a
NameError
and when I checkedrake routes
, I discovered that the RESTful resource routing had defined them as,From my explorations, it seems that Rails routing creates these paths based on the
classify
method but that the Nifty scaffolding uses something else.This may be a problem in Rails itself too because the
form_for
method does not correctly identify the appropriate paths either when using the short form (as defined in http://guides.rubyonrails.org/form_helpers.html#relying-on-record-identification), but I would appreciate it if other more knowledgeable people could confirm that this is indeed a real issue (and that I'm not just forgetting something)I ended up not only having to modify the paths of the scaffold but also have to add conditional code to the forms to assign the appropriate path and method.
The text was updated successfully, but these errors were encountered: