2

I'm not too clear what's the difference between the follwing two notations:

= render :partial => "order_fields", :locals => { :t => type, :f => c}
= render :partial => "order_fields", :locals => { t: type, f: c}

They both seem to work but I can't understand what's the difference. Could you please help me?

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
Don Giulio
  • 2,946
  • 3
  • 43
  • 82

1 Answers1

9

No difference. The latter is a new hash syntax in ruby 1.9.

(Why do I still call this "new syntax"? Ruby 1.9 is 4 years old, and it's not even the current version :))

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367