@@ -231,7 +231,7 @@ def empty?
231231 # # <error>name must be specified</error>
232232 # # </errors>
233233 def to_xml ( options = { } )
234- to_a . to_xml ( { : root => "errors" , : skip_types => true } . merge! ( options ) )
234+ to_a . to_xml ( { root : "errors" , skip_types : true } . merge! ( options ) )
235235 end
236236
237237 # Returns a Hash that can be used as the JSON representation for this
@@ -370,11 +370,11 @@ def full_messages_for(attribute)
370370 def full_message ( attribute , message )
371371 return message if attribute == :base
372372 attr_name = attribute . to_s . tr ( '.' , '_' ) . humanize
373- attr_name = @base . class . human_attribute_name ( attribute , : default => attr_name )
373+ attr_name = @base . class . human_attribute_name ( attribute , default : attr_name )
374374 I18n . t ( :"errors.format" , {
375- : default => "%{attribute} %{message}" ,
376- : attribute => attr_name ,
377- : message => message
375+ default : "%{attribute} %{message}" ,
376+ attribute : attr_name ,
377+ message : message
378378 } )
379379 end
380380
@@ -426,10 +426,10 @@ def generate_message(attribute, type = :invalid, options = {})
426426 value = ( attribute != :base ? @base . send ( :read_attribute_for_validation , attribute ) : nil )
427427
428428 options = {
429- : default => defaults ,
430- : model => @base . class . model_name . human ,
431- : attribute => @base . class . human_attribute_name ( attribute ) ,
432- : value => value
429+ default : defaults ,
430+ model : @base . class . model_name . human ,
431+ attribute : @base . class . human_attribute_name ( attribute ) ,
432+ value : value
433433 } . merge! ( options )
434434
435435 I18n . translate ( key , options )
0 commit comments