Skip to content

Instantly share code, notes, and snippets.

@jonpaul
Created December 8, 2011 19:47
Show Gist options
  • Save jonpaul/1448245 to your computer and use it in GitHub Desktop.
Save jonpaul/1448245 to your computer and use it in GitHub Desktop.
true != 'true'
ruby-1.9.2-p290 :001 > params = {"utf8"=>"✓", "authenticity_token"=>"kAizu8XHaZw9Kw1gtUuU22nWl85WQVV5zTzurdWO1M0=", "internship"=>{"report_accepted"=>"true"}, "commit"=>"Change", "locale"=>"en", "id"=>"28"}
=> {"utf8"=>"✓", "authenticity_token"=>"kAizu8XHaZw9Kw1gtUuU22nWl85WQVV5zTzurdWO1M0=", "internship"=>{"report_accepted"=>"true"}, "commit"=>"Change", "locale"=>"en", "id"=>"28"}
ruby-1.9.2-p290 :002 > params['internship']['report_accepted'] == true
=> false
ruby-1.9.2-p290 :003 > params['internship']['report_accepted'] == 'true'
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment