Suggestion: to extract AC filter methods

29 views
Skip to first unread message

Alexander Kurakin

unread,
Oct 17, 2012, 3:21:29 PM10/17/12
to rubyonra...@googlegroups.com
Suggestion: to extract AbstractController::Callbacks::ClassMethods (maybe to ActiveSupport). Mechanism 'before/after/around' isn't connected with controllers only. Is it? Why not to consider it with ActiveSupport::Callbacks? It will make a possibility to do your own events for 'before/after/around' wrapping... Not only controller's actions...

Ryan Bigg

unread,
Oct 17, 2012, 3:49:13 PM10/17/12
to rubyonra...@googlegroups.com
You can already use ActiveSupport::Callbacks for this. I think the documentation for this class is thorough and should give you a good understand of how it works.



On 18 October 2012 06:21, Alexander Kurakin <kura...@mail.ru> wrote:
Suggestion: to extract AbstractController::Callbacks::ClassMethods (maybe to ActiveSupport). Mechanism 'before/after/around' isn't connected with controllers only. Is it? Why not to consider it with ActiveSupport::Callbacks? It will make a possibility to do your own events for 'before/after/around' wrapping... Not only controller's actions...

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/crPF192VeugJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.

Reply all
Reply to author
Forward
0 new messages