Module: Jabe::BodyClassHelper
- Included in:
- Admin::BaseController, ApplicationController, SessionsController
- Defined in:
- lib/jabe.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
16 17 18 |
# File 'lib/jabe.rb', line 16 def self.included( base ) base.send(:helper_method, :body_class_name) if base.respond_to?(:helper_method) end |
Instance Method Details
#body_class_name ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/jabe.rb', line 20 def body_class_name if self.respond_to?(:controller) controller.class.to_s.underscore.parameterize.dasherize.gsub(/-controller$/, '') else self.class.to_s.underscore.parameterize.dasherize.gsub(/-controller$/, '') end end |