end of day commit

This commit is contained in:
2012-08-29 17:42:04 +02:00
parent 89700f36e9
commit 8213bae2c6
57 changed files with 1109 additions and 128 deletions
+21 -1
View File
@@ -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)