Sha256: a7ed45755a865405d14206755465fd2ccbdcb3a018222fee92de878ee63fcd13
Contents?: true
Size: 621 Bytes
Versions: 27
Compression:
Stored size: 621 Bytes
Contents
# Body class helper striped our from: # https://github.com/thoughtbot/flutie/blob/master/lib/flutie/body_class_helper.rb module BodyClassHelper def body_class(options = {}) extra_body_classes_symbol = options[:extra_body_classes_symbol] || :extra_body_classes qualified_controller_name = controller.controller_path.gsub('/','-') basic_body_class = "#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}" if content_for?(extra_body_classes_symbol) [basic_body_class, content_for(extra_body_classes_symbol)].join(' ') else basic_body_class end end end
Version data entries
27 entries across 22 versions & 2 rubygems