On 12 February 2012 22:51, Mauro <mrsan...@gmail.com> 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?

I think you are right, I don't see it in the docs.  Possibly a better
way anyway, which might make more readable code, would be to not call
authenticate directly from the filter but to call a method you provide
which checks the params and calls authenticate if necessary.  Then all
the logic is in one place.

Colin

-- 
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.

Reply via email to