I am upgrading to rails 3.1. in my old application.html.erb, I have a line of this:
<%= stylesheet_link_tag "themes/#{session[:theme].nil? ? 'base' :
session[:theme]}/ui.all" %>
As you know, I want to change the style base on the session[:theme].
Thanks to This link, I made a little progress. I modified my application.css.erb to this:
/*
* *= require_self
* */
<%
require_asset("themes/#{session[:theme].nil? ? 'base' :
session[:theme]}/ui.all" )
k%>
/* rest of file omitted */
But it complains this:
undefined local variable or method `session' for #<#<Class:0x95152e4>:0x9c6c8bc>
(in /home/rocky/work/apps/fanfan/app/assets/stylesheets/application.css.erb)