I'm not sure, but you probably should rewrite that: if @channel.nil? && !current_associate.watching_channel_id.nil? && current_associate.watching_channel_id > 0
better still why are you checking if watching_channel_id is gt 0? Is watching_channel_id a foreign key for an association for watching channel? then you could do this: if @channel.nil? && current_associate.watching_channel Sorry I couldn't specifically answer your question, but hope the code review was useful. Cheers, Nicholas On Jul 16, 7:47 pm, JannaB <[email protected]> wrote: > Why would a particular line: > > if @channel == nil && current_associate.watching_channel_id != nil && > current_associate.watching_channel_id > 0 > > alsways output the statement: > > false > > to the console???? > > I am using Rails 2.3.2 -Janna B --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

