How to handle different scenarios across different actions in a Rails controller dried with inherited_resources -
Say I have the following controllers and want to ban: Edit, update, and: Delete the current user's own foyer.
P>
My simple and probably naive question is whether the above situation can be re-applied to look better? It feels like I am overriding a lot of heritage resources.
If you want the facility of the building, foo through the current user Only one before_filter (see below) will use. However, I will apply an authorization library as soon as possible to delete and delete the actions.
Class FooController & lt; InheritedResources :: Base before_filter: login_required before_filter: assign_user ,: only = & gt; [: Create] Feedback: html Personal DRAF Assignor Build_Source By User = Current_Under End End
:
Comments
Post a Comment