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
Currently, you can pass an :if option to the attribute directive. It would be helpful if this option could be a symbol of a method on the controller instead of a Proc. It would function like before_action on controllers and validate on models. Instead of passing the current controller/context into the proc, you'd just call the method on the controller (or maybe call it from 'within' the context of the controller so it can use private/protected methods, similar to before_action).
Activity
richmolj commentedon Jun 5, 2018
Hey @hidde-jan! So this would be functionally equivalent but syntactic sugar, right? And protected/private methods.
Not opposed to it if you'd like to PR!