The data validation parameters of the Ruby on Rails Framework use values with :
before and after the word.
validates :terms_of_service, acceptance: { accept: true, message: 'Mensagem de Validação' }
validates :city, presence: true
How do they work and what kind of value are they?
What is the difference in :
at the beginning and :
at the end of the word?
Note: The question does not aim to compare a String % with_a% with a symbol to a String
"texto"
, but with symbols:texto
and:valor
.