Nevermind. I wound up going the route of alias_method_chain-ing
SiteController's #show_page method. It makes things more tightly
coupled to Radiant but it's also closer to how it'd be if built-in.
If anybody else out there is already using alias_method_chain on this
method in your extension, let me know. I'd sure love to avoid a 20 car
pileup there if a user has multiple extensions installed.
-Chris
Chris Parrish wrote:
This may be more Rails than Radiant but can anyone give me a hand with
this one...
How do I execute ActionController::Routing::Routes.reload! for a
running instance of Radiant from a Rake task? It works fine if I
trigger it from within the app but I need it to run from Rake and it
seems that Rake runs in a separate process.
Background for those who want it:
In the SnS extension, I define custom routes for CSS and JS files to
route to my own TextAssetSiteController. I did this to prevent
coupling too tightly with SiteController.
Well, now I'm upgrading the functionality to allow admins to change
the configuration on the fly using Rake tasks. This includes settings
that require the route to be updated and I don't know how to get Rake
to run ActionController::Routing::Routes.reload! for a running
instance of Radiant.
-Chris
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant