module Aerogel::Errors::Translated
Public Class Methods
new( *args )
click to toggle source
Calls superclass method
# File lib/aerogel/core/errors.rb, line 5 def initialize( *args ) @translation_key = nil if args.first.is_a? Symbol @translation_key = args.shift end super( *args ) end
Public Instance Methods
to_s()
click to toggle source
Calls superclass method
# File lib/aerogel/core/errors.rb, line 13 def to_s if @translation_key Aerogel::I18n.t @translation_key, scope: 'errors.messages' else super end end