Sha256: 5411ba29ab58384f53d6c9939c7cab728842bf66a99189e10f9438d5341b07d3

Contents?: true

Size: 684 Bytes

Versions: 3

Compression:

Stored size: 684 Bytes

Contents

module Admin

  module BaseHelper

    def title(page_title)
      content_for(:title) { page_title }
    end

    def header
      render "admin/helpers/header"
    end

    def has_root_path?
      Rails.application.routes.routes.map(&:name).include?("root")
    end

    def apps
      render "admin/helpers/apps"
    end

    def login_info
      unless admin_user.is_a?(FakeUser)
        render "admin/helpers/login_info"
      end
    end

    def display_flash_message(message = flash)
      if message.compact.any?
        render "admin/helpers/flash_message",
               :flash_type => message.keys.first,
               :message => message
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
typus-3.0.6 app/helpers/admin/base_helper.rb
typus-3.0.5 app/helpers/admin/base_helper.rb
typus-3.0.4 app/helpers/admin/base_helper.rb