documentation of filter order

7 views
Skip to first unread message

Brian Sammon

unread,
Jan 29, 2015, 10:47:18 AM1/29/15
to rubyonra...@googlegroups.com
Is there any good documentation of the controller callback order for
rails?

I'm not sure whether the before_action comes before the around_action,
if it comes after, or maybe "it depends".

The Action Controller guide doesn't really answer the question.

Colin Law

unread,
Jan 29, 2015, 10:56:10 AM1/29/15
to rubyonra...@googlegroups.com
On 29 January 2015 at 15:46, Brian Sammon
http://guides.rubyonrails.org/active_record_callbacks.html#available-callbacks
says that they are listed in the order they will get called.

Colin

>
> --
> 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-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/20150129104637.96fd7141b23464613fd80528%40brisammon.fastmail.fm.
> For more options, visit https://groups.google.com/d/optout.

Brian Sammon

unread,
Jan 29, 2015, 11:12:10 AM1/29/15
to rubyonra...@googlegroups.com
On Thu, 29 Jan 2015 15:54:54 +0000
Colin Law <cla...@gmail.com> wrote:

> On 29 January 2015 at 15:46, Brian Sammon
> <rubyonra...@brisammon.fastmail.fm> wrote:
> > Is there any good documentation of the controller callback order for
> > rails?
> >
> > I'm not sure whether the before_action comes before the around_action,
> > if it comes after, or maybe "it depends".
> >
> > The Action Controller guide doesn't really answer the question.
>
> http://guides.rubyonrails.org/active_record_callbacks.html#available-
> callbacks
> says that they are listed in the order they will get called.

I'm sorry -- I was asking about Controller _filters_, not model
_callbacks_.

If only filters were as well documented as callbacks.

Colin Law

unread,
Jan 29, 2015, 11:19:27 AM1/29/15
to rubyonra...@googlegroups.com
On 29 January 2015 at 16:11, Brian Sammon
No need to be sorry, my error. That's what comes from not reading the question.

Colin

>
> --
> 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-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/20150129111145.ee8c8ad738eff741605309d9%40brisammon.fastmail.fm.
Reply all
Reply to author
Forward
0 new messages