Rails template switching help
I've been playing with Rails for the past few days and I'm really getting into it after 6 years of PHP development, but I've hit my first major snag:
I'm trying to introduce template/skin switching for an app and it seems to me that the simplest way is to change the value of ActionController::Base.template_root based on a method 'choose_skin' or the default of '/views'.As a quick test, I tried adding the following into application.rb (ApplicationController class):
When I run the code, I get an 'Action Controller: Exception caught' error:
template_root = skin_choose || '/views'
skin = @session
I'm still very new to Rails so I'm probably missing a pretty obvious error to do with the scope, but I can't see it at the moment, so would appreciate any help getting the above to work (or suggesting a better method).
undefined local variable or method `skin_choose' for ApplicationController:Class
Thanks in advance :)