Sha256: 49776fa171e78f0c8011be37a246da65ffac1f9712f2917a132eab0785d94243

Contents?: true

Size: 619 Bytes

Versions: 15

Compression:

Stored size: 619 Bytes

Contents

module MixRailsAuth
  class Engine < ::Rails::Engine
    def navigation
      if defined? Admix
        Admix::Navigation::NavBar.post_menu do
          Admix::Navigation::NavBar.find(:general) do |menu|
            menu.submenu do |submenu|
              submenu.key   = :users
              submenu.title = I18n.t 'users.users'
              submenu.url   = 'admix_users_url'

              submenu.instance_eval do
                def can_render?(current_user)
                  current_user.is?(:admin)  
                end
              end

            end
          end
        end
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
mix-rails-0.16.0 mix-rails-auth/lib/mix-rails-auth/engine.rb
mix-rails-auth-0.16.0 lib/mix-rails-auth/engine.rb
mix-rails-0.15.0 mix-rails-auth/lib/mix-rails-auth/engine.rb
mix-rails-auth-0.15.0 lib/mix-rails-auth/engine.rb
mix-rails-0.12.2 mix-rails-auth/lib/mix-rails-auth/engine.rb
mix-rails-auth-0.12.2 lib/mix-rails-auth/engine.rb
mix-rails-0.12.1 mix-rails-auth/lib/mix-rails-auth/engine.rb
mix-rails-auth-0.12.1 lib/mix-rails-auth/engine.rb
mix-rails-auth-0.11.0 lib/mix-rails-auth/engine.rb
mix-rails-0.10.4 mix-rails-auth/lib/mix-rails-auth/engine.rb
mix-rails-auth-0.10.4 lib/mix-rails-auth/engine.rb
mix-rails-0.10.3 mix-rails-auth/lib/mix-rails-auth/engine.rb
mix-rails-auth-0.10.3 lib/mix-rails-auth/engine.rb
mix-rails-auth-0.10.2 lib/mix-rails-auth/engine.rb
mix-rails-auth-0.10.1 lib/mix-rails-auth/engine.rb