Hi,
I have a simple problem. I get a boolean value in the parameter hash
and want to negate it. But somehow I missed there a fundamental
concept, because that doesn't make any sense to me:
Code:
test1 = !params[:editmode]
test2 = params[:editmode]
logger.info("Editmode: #{params[:editmode]} Test 1: #{test1} und Test
2: #{test2}")
Output:
"Editmode: false Test 1: false und Test 2: false"
or when editmode is true: "Editmode: true Test 1: false und Test 2:
true"
Thanks for your help
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---