On Sat, Feb 11, 2012 at 9:46 PM, Mauro <mrsan...@gmail.com> wrote: > route.rb > > match "/:layout" => "company@index" > > in application_controller I have: > > before_filter :authenticate_user! > rescue_from DeviseLdapAuthenticatable::LdapException do |exception| > render :text => exception, :status => 500 > end > protect_from_forgery > before_filter :set_layout > > layout :specify_layout > > def specify_layout > if @current_layout == :intra > "intranet" > elsif @current_layout == :inter > "internet" > else > "application" > end > end > > def set_layout > if params[:layout] == "intraOp" > session[:current_layout] = :intra > elsif params[:layout] == "interOp" > session[:current_layout] = :inter > else > session[:current_layout] = nil > end > @current_layout = session[:current_layout] > end > end > > in another controller I have: > > skip_filter :authenticate_user!, :only => [:index, :show] unless > @current_layout.nil? > > unless condition seem does not work. > What I am missing? > > Maybe it could be :unless => @current_layout.nil? instead of unless @current_layout.nil?
> -- > 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@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.