Ruby on Rails Gotchas
BetterExplained erklärt einige gotchas mit Ruby on Rails.
Der Code von Ruby Skripten wird schon etwas klarer wenn man weiß:
- Parenthesis on method calls are optional; use print “hi”.
- Semicolons aren’t needed after each line (crazy, I know).
- Use “if then else end” rather than braces.
- Parens aren’t needed around the conditions in if-then statements.
- Methods automatically return the last line (call return explicitly if needed)

