Ruby on Rails
Sunday, February 19, 2017
I have admins and users sharing the same controller and model
Admins have more liberties so users form is different view
For new and create actions for example should i write new actions to work with the users form submission or should i put a conditional express in my before_action
I had the creative idea that I could use authenticate_user|authenticate_admin for my callback but it seems there's no such thing but I can use a conditional expression What's the solution?
-- Admins have more liberties so users form is different view
For new and create actions for example should i write new actions to work with the users form submission or should i put a conditional express in my before_action
I had the creative idea that I could use authenticate_user|authenticate_admin for my callback but it seems there's no such thing but I can use a conditional expression What's the solution?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f8effe78-61c8-492b-902a-5f4f07303676%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment