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

Version Path
venice-chr-0.1.5 app/helpers/body_class_helper.rb
chr-0.5.8 test/rails_app/app/helpers/body_class_helper.rb
venice-chr-0.1.4 app/helpers/body_class_helper.rb
chr-0.5.7 templates/body_class_helper.rb
chr-0.5.7 test/rails_app/app/helpers/body_class_helper.rb
venice-chr-0.1.3 app/helpers/body_class_helper.rb
venice-chr-0.1.2 app/helpers/body_class_helper.rb
venice-chr-0.1.1 app/helpers/body_class_helper.rb
chr-0.5.6 test/rails_app/app/helpers/body_class_helper.rb
chr-0.5.6 templates/body_class_helper.rb
chr-0.5.5 test/rails_app/app/helpers/body_class_helper.rb
chr-0.5.5 templates/body_class_helper.rb
chr-0.5.4 templates/body_class_helper.rb
chr-0.5.4 test/rails_app/app/helpers/body_class_helper.rb
chr-0.5.3 templates/body_class_helper.rb
chr-0.5.3 test/rails_app/app/helpers/body_class_helper.rb
chr-0.5.1 templates/body_class_helper.rb
chr-0.5.0 templates/body_class_helper.rb
chr-0.4.25 templates/body_class_helper.rb
chr-0.4.24 templates/body_class_helper.rb