Sha256: 765eaea761e3fe8e02112d3e0a47914c6defa0d697a15eb92e59809d4fb76766

Contents?: true

Size: 671 Bytes

Versions: 2

Compression:

Stored size: 671 Bytes

Contents

module ControllerHelper
  module ClassMethods
    #
    # Navigation
    #
    def logo opt = {}, &block
      before opt do |controller|
        controller.instance_variable_set "@logo", controller.instance_eval(&block)
      end
    end

    def breadcrumb opt = {}, &block
      before opt do |controller|
        controller.instance_variable_set "@breadcrumb", controller.instance_eval(&block)
      end
    end

    def active_menu opt = {}, &block
      before opt do |controller|
        controller.instance_variable_set "@active_menu", controller.instance_eval(&block)
      end
    end
  end

  protected
    def set_theme
      @theme = "simplicity"
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rad_users-0.0.2 lib/users/controller_helper.rb
rad_users-0.0.1 lib/users/controller_helper.rb