Hmm. Will give that a whirl then. I'll let you know. Thanks.
Alex Wayne wrote:
Chris Parrish wrote:
My question was originally tied to approach #1. I could use a Rake task
already-running server to reload its routes.
Now I'm working on having an augmented SiteController#show_page action
process the whole thing (#2). If I use a before_filter to call my
#show_text_asset action and it finds and renders the script/stylesheet,
how to I then prevent things from proceeding on to #show_page?
Will rails let you set up a before_filter against only one action,
I believe, in any rails before_filter if you call render or redirect_to,
it halts the filter chain and prevents further execution. This is
commonly used for access control. So as long as you render something,
it should works just as you need it too. Unless radiant does something
funky with rendering that I dont know about.
redirect_to login_url unless admin_logged_in?
And yes, you can fine tune your before filters by passing action names
to the :only or :except keys of the options hash.
before_filter :foo, :only => [:index, :show]
before_filter :foo, :except => [:create]
They are pretty flexible creatures.
Radiant mailing list