I started with rails two months ago, I still like it but there is one huge problem. It's about the heavy use of hashes in rails forms.
There are so many possible ways how to do that and I've seen alot of examples depending on hashes but it's always an another synstax.
some write it like this
:foo => :bar
foo: :bar
"foo" => "bar"
I always mix them up and get alot of syntax errors , can someone explain me the right way how to do that?
this is a symbol :foo
it's the same like "foo"
right?
Also: if I got a form_tag(@something)
, why do I have to make brackets if I want to access html elements?
like form_tag(@something, :html => {:foo => :bar})
Can someone explain it ?
thanks