Module: ActiveAdmin::ViewsHelper
- Defined in:
- app/helpers/active_admin/views_helper.rb
Instance Method Summary collapse
Instance Method Details
#currency(value) ⇒ Object
11 12 13 14 |
# File 'app/helpers/active_admin/views_helper.rb', line 11 def currency(value) return "" if value.blank? "#{value} #{I18n.t('smartkiosk.main_currency')}" end |
#percent(value) ⇒ Object
16 17 18 19 |
# File 'app/helpers/active_admin/views_helper.rb', line 16 def percent(value) return "" if value.blank? "#{value}%" end |
#status_boolean(context, value) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'app/helpers/active_admin/views_helper.rb', line 2 def status_boolean(context, value) return "" if value.nil? if value context.status_tag I18n.t('formtastic.yes'), :ok else context.status_tag I18n.t('formtastic.no'), :error end end |