Module: HotBody

Included in:
ApplicationHelper
Defined in:
lib/hot_body.rb

Instance Method Summary collapse

Instance Method Details

#body_classObject



9
10
11
# File 'lib/hot_body.rb', line 9

def body_class
  controller.action_name+' '+(current_user ? ' signed_in' : '')
end

#body_idObject



3
4
5
6
7
# File 'lib/hot_body.rb', line 3

def body_id
  body_id = controller.class.name.sub(/Controller$/, '').sub(/::/, '').underscore+'_page'
  body_id.sub!(/^devise_/, "devise_#{controller.scope_name}_") if body_id.match(/^devise_/)
  return body_id
end