Yep, I did that, I get this error

"Called id for nil, which would mistakenly be 4 -- if you really wanted 
the id of nil, use object_id"



Patrick Doyle wrote:
> On Wed, Jan 21, 2009 at 10:12 AM, Mohammad Abed <
> [email protected]> wrote:
> 
>> mysite.com/galleries
>>      @galleries = Gallery.find(:all, :conditions => ['visibility_status
>> end
>> --
>>
> What part doesn't seem to work?
> 
> Could it be fixed if you structured the code as:
> 
> if params[:user_id].blank?
>   blah_blah_blah
> else
>   if current_user.id.to_s == params[:user_id]
>     blah_blah
>   else
>     blah
>   end
> end
> 
> --wpd

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

Reply via email to