Vishwanath Nayak wrote:
> Hi,
>
> are you sure its a string? just check with @state.class, and also try to
> print the value before the if (so as to confirm its not getting modified
> later on)
>
> -NAYAK
>
> On Wed, Jan 7, 2009 at 11:38 PM, Fididle Fididle <
Thanks Nayak. I was trying to compare an array with a simple string.
Changing the test (below) works.
----------
controller
---------
...
def search
...
@state = params[:state]
@debug = 0
if @state[0] == "ALL"
@debug = 1
end
...
end
--
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
-~----------~----~----~----~------~----~------~--~---