dimanche 2 décembre 2018

Difference between [:key] and ["key"] in ruby [duplicate]

I want to know the difference between [:key] and ["key"]. Like when we get params in controller by form. If we iterate them like params[:key] or params["key"]

Both behave same. So what the difference in them if any?

Another thing which I can't differentiate till yet and not get any major difference between

:key => value and key: value

Please tell me their differences

Aucun commentaire:

Enregistrer un commentaire