module Shipyard::LayoutHelper

Public Instance Methods

current_action() click to toggle source
# File lib/shipyard-framework/helpers/layout_helper.rb, line 15
def current_action
  controller.action_name.dasherize
end
current_controller() click to toggle source
# File lib/shipyard-framework/helpers/layout_helper.rb, line 11
def current_controller
  controller.controller_name.dasherize
end
current_page() click to toggle source
# File lib/shipyard-framework/helpers/layout_helper.rb, line 19
def current_page
  "#{current_controller}-#{current_action}"
end
current_route() click to toggle source
# File lib/shipyard-framework/helpers/layout_helper.rb, line 23
def current_route
  "#{controller.controller_name}##{controller.action_name}"
end
current_route_is?(routes) click to toggle source
# File lib/shipyard-framework/helpers/layout_helper.rb, line 27
def current_route_is?(routes)
  routes.tr(' ', '').split(',').include? current_route
end
shipyard_css_classes() click to toggle source
# File lib/shipyard-framework/helpers/layout_helper.rb, line 3
def shipyard_css_classes
  css_classes = []
  css_classes << current_page
  css_classes << current_controller
  css_classes << "env-#{::Rails.env}"
  css_classes.join(' ')
end