That is not necessary, Now I get the same error for the first if clause
(when the param is null, and I just type "mysite.com/galleries", the
other two clauses work ok. This what my code looks like
if params[:user_id].blank?
@galleries = Gallery.find(:all, :conditions => ['visibility_status =
?', true])
elseif current_user.id.to_s == params[:user_id]
@galleries = current_user.galleries
else
@galleries = Gallery.find(:all, :conditions => ['user_id=? and
visibility_status = ?', params[:user_id], true])
end
Rob Biedenharn wrote:
> Did you call logged_in? before current_user to make sure that it is
> valid?
>
> -Rob
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---