end of day commit
This commit is contained in:
@@ -26,8 +26,28 @@ module ApplicationHelper
|
||||
'Qwaiter'
|
||||
end
|
||||
|
||||
# Helper for displaying HTML currency values
|
||||
def currency(amount, opts={})
|
||||
amount ||= 0.0
|
||||
amount = amount.to_f
|
||||
#prefix = case company.currency
|
||||
# when 'GBP' then '£ '
|
||||
# when 'USD' then '$ '
|
||||
# else '€ '
|
||||
# end
|
||||
prefix = '€ '
|
||||
return (prefix + ("%.2f" % amount)).html_safe
|
||||
|
||||
# Rails native is ambiguous since is uses translation hashes
|
||||
options = {:unit => '€'}.merge(opts)
|
||||
number_to_currency(amount, options)
|
||||
end
|
||||
def list_open?
|
||||
session[:active_list_id].present?
|
||||
active_list_id.present?
|
||||
end
|
||||
|
||||
def active_list_id
|
||||
current_user.try(:active_list_id)
|
||||
end
|
||||
|
||||
def no_content_given(model)
|
||||
|
||||
Reference in New Issue
Block a user