Closed mathieul closed 10 years ago
Right. I almost always write my hashes like you've changed this to, but in this case I left the braces because it led into passing variables or method calls right into the fill_form
call, which is probably the more common use case.
Well in MRI it is:
irb(main):001:0> { name: 'Caleb', email: 'caleb@thoughtbot.com', 'Terms of Service': true }
SyntaxError: (irb):1: syntax error, unexpected ':', expecting =>
...htbot.com', 'Terms of Service': true }
... ^
from /Users/mathieu/.rbenv/versions/2.1.1/bin/irb:11:in `<main>'
Ah, you're right. I was distracted by the brace removal. Can you add those back in and keep the change from '':
to '' =>
?
@mathieul well spotted! Like @calebthompson I also thought you just removed the braces :D
Too much javascript lately :D
Ping @mathieul
Hey. I just pointed out the error, I don't mind if you close this pull request and fix it the way which suits you. Cheers.
It is not a syntax error just a matter of taste.