r/learnruby • • Apr 07 '17
Simple question about symbol syntax
I'm having some trouble understanding this statement I'm somewhat familiar with ruby but symbols still trip me up sometimes especially when used within hashes and all the different ways to write out hashes with symbols.
validates :content, length: { maximum: 140 }
now my question is what exactly is the length: { maxiumum: 140 } doing? is it passing a length symbol with some parameter?
2
Upvotes
View all comments
Show parent comment
2
u/pat_trick Intermediate Apr 08 '17
No problem! I'm a Rails developer by trade, so the ecosystem is familiar to me.