Sha256: e525065d79fc75c21e0553aba6e4a5a5db32ac423335f6c72b75d300a1371d18

Contents?: true

Size: 720 Bytes

Versions: 32

Compression:

Stored size: 720 Bytes

Contents

module RailsAdmin
  module Config
    module Actions
      class ShowInApp < RailsAdmin::Config::Actions::Base
        RailsAdmin::Config::Actions.register(self)

        register_instance_option :member do
          true
        end

        register_instance_option :visible? do
          authorized? && (bindings[:controller].main_app.url_for(bindings[:object]) rescue false)
        end

        register_instance_option :controller do
          proc do
            redirect_to main_app.url_for(@object)
          end
        end

        register_instance_option :link_icon do
          'icon-eye-open'
        end

        register_instance_option :pjax? do
          false
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
rails_admin-2.3.1 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.3.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.2.1 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.2.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.1.1 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.1.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.0.2 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.4.3 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.0.1 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.0.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.0.0.rc lib/rails_admin/config/actions/show_in_app.rb
rails_admin-2.0.0.beta lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.4.2 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.4.1 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.4.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.3.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.2.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.1.1 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.1.0 lib/rails_admin/config/actions/show_in_app.rb
rails_admin-1.0.0 lib/rails_admin/config/actions/show_in_app.rb