Ahh I did it :)
For anyone who is interested, its purley a matter of having the
following in a helper file:
# NB: This overrides an undocumented rails function in order to add
# a search path. We need this to get themes working, but I''d be
# happier if we didn''t have to override undocumented methods. Ho
# hum. -- pdcawley
def search_paths
["../../themes/#{this_site.theme.name}/views", # for normal views
".",
"../app/views"]
end
def full_template_path(template_path, extension)
search_paths.each do |path|
themed_path = File.join(@base_path, path,
"#{template_path}.#{extension}")
return themed_path if File.exist?(themed_path)
end
# Can''t find a themed version, so fall back to the default
behaviour
super
end
and having the appropriately set models. Also, check out cached_model
project, as that is very useful for performance enhancing when calling
the same method many times on one request.
Tim
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---