Created
August 27, 2010 00:51
-
-
Save rafb43/552547 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # odd difference between Ruby's AND comparison operators: '&&' and 'and' | |
| ## | |
| # with '&&' it will throw an error expecting 'end' after params.include? | |
| if request.post? && request.params.include? 'post_param' then | |
| end | |
| # with 'and' it will work fine and you'll call the day for a beer | |
| if request.post? and request.params.include? 'post_param' then | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
even ruby can be odd sometimes :)