Try this:

before_filter :authenticate_user!
*return true if @current_layout.nil?*
rescue_from DeviseLdapAuthenticatable::LdapException do |exception|
render :text => exception, :status => 500
end

And then:

skip_filter :authenticate_user!, :only => [:index, :show]


But, I don't know if the condition should be:

*return true if @current_layout.nil?*
*or*
*return true unless @current_layout.nil?*
*
*
because I didn't understand very well what are you doing.


Regards,
Everaldo



On Sun, Feb 12, 2012 at 8:51 PM, Mauro wrote:

@current_layout is nil but authenticate_user! in companies_controller
is skipped despite :unless => lambda {@current_layout.nil?}
Perhaps skip_filter does not accept conditionals unless or if?

--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 14 of 16 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 11, '12 at 11:46p
activeFeb 13, '12 at 9:46a
posts16
users5
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase