Sha256: 025fb6b8c606cb75c3f363d457142afe9856961c5e4101bdca1477beebe1c9a0

Contents?: true

Size: 541 Bytes

Versions: 6

Compression:

Stored size: 541 Bytes

Contents

# Copied from Curate
module Worthwhile::ThemedLayoutController
  extend ActiveSupport::Concern

  included do
    class_attribute :theme
    self.theme = 'curate_nd'
    helper_method :theme
    helper_method :show_site_actions?
    helper_method :show_site_search?
  end

  module ClassMethods
    def with_themed_layout(view_name = nil)
      if view_name
        layout("#{theme}/#{view_name}")
      else
        layout(theme)
      end
    end
  end

  def show_site_actions?
    true
  end

  def show_site_search?
    true
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
worthwhile-0.1.2 app/controllers/concerns/worthwhile/themed_layout_controller.rb
worthwhile-0.1.1 app/controllers/concerns/worthwhile/themed_layout_controller.rb
worthwhile-0.1.0 app/controllers/concerns/worthwhile/themed_layout_controller.rb
worthwhile-0.0.3 app/controllers/concerns/worthwhile/themed_layout_controller.rb
worthwhile-0.0.2 app/controllers/concerns/worthwhile/themed_layout_controller.rb
worthwhile-0.0.1 app/controllers/concerns/worthwhile/themed_layout_controller.rb