1) eager load reports for receipt/details 2) introduce number_format lookups to replace print_settings for number formatting 3) implement NumberFormattable concern, reference number_format lookups or print_settings if not exist, to get number format settings and number formatting 4) replace rails NumberHelper.number_with_precision with NumberFormattable.number_format hopefully to reduce overhead, formatting numbers for huge lists of data
14 lines
302 B
Ruby
Executable File
14 lines
302 B
Ruby
Executable File
module ApplicationHelper
|
|
include NumberFormattable
|
|
|
|
def flash_class(level)
|
|
case level
|
|
when :notice then "alert alert-info fade-in"
|
|
when :success then "alert alert-success fade-in"
|
|
when :error then "alert alert-error fade-in"
|
|
when :alert then "alert alert-error fade-in"
|
|
end
|
|
end
|
|
|
|
end
|