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
You cannot detach a user resource because you get the error: use_resource for NIL class. This may be because the DELETE request for the association does not have the field. To "fix" this, you need to declare the "fields" method only with the association, such as
With the "fields" method, the detach will work. You may need to check that a detach is also covered in "form_fields" so that you do not have to declare the "fields" method just for the detach. We are trying to make the code cleaner and easier to read by separating the different views into the corresponding field methods. It would be nice to not have the "fields" method for some resources and use the form/display fields completely.
The text was updated successfully, but these errors were encountered:
If you declare
display_fields' and
form_fields' like thisYou cannot detach a
user
resource because you get the error:use_resource
for NIL class. This may be because the DELETE request for the association does not have the field. To "fix" this, you need to declare the "fields" method only with the association, such asWith the "fields" method, the detach will work. You may need to check that a detach is also covered in "form_fields" so that you do not have to declare the "fields" method just for the detach. We are trying to make the code cleaner and easier to read by separating the different views into the corresponding field methods. It would be nice to not have the "fields" method for some resources and use the form/display fields completely.
The text was updated successfully, but these errors were encountered: