Sha256: aa29af4bb69b8ac7dcf58542e34c1829a8d7aff390d6fcfd46346f44b3d55b3d

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

module Admin

  module DashboardHelper

    def applications
      render File.join(path, "applications")
    end

    def resources
      available = Typus.resources.map do |resource|
                    resource if @current_user.resources.include?(resource)
                  end.compact

      return if available.empty?

      render File.join(path, "resources"), :resources => available
    end

    private

    def path
      "admin/helpers/dashboard"
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typus-1.0.0.pre8 app/helpers/admin/dashboard_helper.rb
typus-1.0.0.pre7 app/helpers/admin/dashboard_helper.rb