views:

14

answers:

1

I am new to the Rails community, and I also like to try and follow the conventions that the community uses. In the Rails 3 books I have been reading I have noticed that the authors have been opting for the old :key => value syntax versus the new Ruby 1.9 style key: value. Do Rails developers generally adhere to one style and not use the other, or is it "stylish", or okay to use the newer syntax?

+2  A: 

I don't think it's a matter of style so much as compatibility. Rails 3 does not require Ruby 1.9, so people generally can't assume that new Ruby syntax will apply to their Rails audience.

Jimmy Cuadra
That's a good point, I didn't take into account that some people are still using Ruby 1.8. Thanks for reminding me.
agentbanks217