|
Articles tagged theme
Looks like theme_support doesn't work if route ends with an extension, like "/blog/rss.rxml", nor does it work with namespaced action mailer templates. So I had to change the actionview_ex.rb quite a bit to make it to work. here the updated code:
Changes are:
Updates, ActionView::TemplateError checkcool, somebody actually read my stuff! well, yes, above hack returns a very bad exception message if you have a error anywhere in ruby code or in rhtml template. Below is the code I should've put up earlier, just never got time to do it. Now here it is.
Views: 2123
Replies: 2
Last Reply:
dorren,
12/04/2007.
Tags:
theme
If you want to add theme support to your rails app, easiest way is to use Matt McCray's theme_support plugin. just do "script/plugin install http://mattmccray.com/svn/rails/plugins/theme_support/" to get it.
1. The ProblemBut it doesn't work out of box. when you start the server, you'll get error like:
Since the last update of the plugin was April 2006, and now is Oct 2007, so changes of rails internal must made the plugin incompatible. On Matt's blog, someone suggested a workaround, to change the route function calls in plugin's route patch (lib/patch/routeset_ex.rb). But I choose to take a more conservative approach, not to patch routing at all.2. The FixSo here are the changes I made to the plugin to make it futureproof.
Now start the server, and it shall work. 3. UsageTo create a new theme, do "script/generate theme YOUR_THEME_NAME", see plugin's readme for more usage.4. Related pageshttp://code.google.com/p/rails-multisite/http://wiki.rubyonrails.org/rails/pages/View+Extensions if it's not down.
Views: 1634
Replies: 0
Tags:
theme
|
login or sign up
to participate.
Tags
moneywill |
|||||||||||||||||||||||||||||||