module ActiveModel::BetterErrors
Constants
- VERSION
Attributes
formatter[RW]
Public Class Methods
format_message(base, message)
click to toggle source
# File lib/active_model/better_errors.rb, line 55 def format_message(base, message) formatter.new(base, message).format_message end
get_reporter_class(name, reporter)
click to toggle source
# File lib/active_model/better_errors.rb, line 49 def get_reporter_class(name, reporter) return reporter if reporter.is_a? Class class_name = "#{reporter}_#{name}_reporter" "active_model/better_errors/#{class_name}".classify.constantize end
reporters()
click to toggle source
# File lib/active_model/better_errors.rb, line 44 def reporters @reporter_maps ||= {} @reporter_maps.clone end
set_reporter(name, reporter)
click to toggle source
# File lib/active_model/better_errors.rb, line 37 def set_reporter(name, reporter) name = name.to_s @reporter_maps ||= {} return @reporter_maps.delete(name) unless reporter @reporter_maps[name] = get_reporter_class(name, reporter) end