Forum: Ruby on Rails prepend_before_filter

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2007-02-14 01:52
(Received via mailing list)
I've got a couple of before_filters that need to run in a specific
order.  One does a redirect_to if a session variable isn't set.  The
other does a find which will fail if the session variable isn't set.  So
they need to run in that order.  But prepend_before_filter doesn't seem
to be working as advertised.  Anybody got any insight?  I'm still
running on 1.1.6

TIA,
Bill
18d8b0c948dd7b3d39c9667cfd4e817c?d=identicon&s=25 Andrew Stone (astone)
on 2007-02-14 01:55
(Received via mailing list)
On 2/13/07, Bill Walton <bill.walton@charter.net> wrote:
>
>  I've got a couple of before_filters that need to run in a specific
> order.  One does a redirect_to if a session variable isn't set.  The other
> does a find which will fail if the session variable isn't set.  So they need
> to run in that order.  But prepend_before_filter doesn't seem to be working
> as advertised.  Anybody got any insight?  I'm still running on 1.1.6
>
> TIA,
> Bill
>

I've never used prepend_before_filter, so I don't have a clue.  I have a
similar scenario and I just have one before_filter method that calls
other
methods in the order I need.

--
Andrew Stone
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2007-02-14 03:25
(Received via mailing list)
Hi Andrew,

Andrew Stone wrote:
> I just have one before_filter method that
> calls other methods in the order I need.

Thanks for your reply.  I started going in that direction but, depending
on
the controlller, I call one, the other, or both in order so the
before_filter was getting kind of big and ugly.

May end up just having to live with that I guess.

Best regards,
Bill
This topic is locked and can not be replied to.