Module: Boss::ApplicationHelper
- Defined in:
- app/helpers/boss/application_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ac_helper ⇒ Object
3 4 5 |
# File 'app/helpers/boss/application_helper.rb', line 3 def self.ac_helper @ac_helper ||= ActionController::Base.new end |
Instance Method Details
#banner_viewer ⇒ Object
7 8 9 10 11 |
# File 'app/helpers/boss/application_helper.rb', line 7 def # ::ApplicationController.ac_helper.render_to_string(partial: "boss/banners/banner_viewer", # locals: {banners: Boss::Banner.all}).html_safe render partial: "boss/banners/banner_viewer", locals: {banners: Boss::Banner.all} end |
#include_i18n_calendar_javascript ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/boss/application_helper.rb', line 13 def include_i18n_calendar_javascript content_for :head do javascript_include_tag case I18n.locale when :en then "#{::ActionController::Base.helpers.asset_path('datepicker-locales/jquery.ui.datepicker-en-GB.js')}" when :pt then "#{::ActionController::Base.helpers.asset_path('datepicker-locales/jquery.ui.datepicker-pt-BR.js')}" else raise ArgumentError, "Locale error" end end end |