Sha256: 54e2bc54ec099e86176d23c0c47134ce7c62ea662702f4ad0074ab8da306691d

Contents?: true

Size: 961 Bytes

Versions: 32

Compression:

Stored size: 961 Bytes

Contents

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

        register_instance_option :authorization_key do
          :history
        end

        register_instance_option :member do
          true
        end

        register_instance_option :route_fragment do
          'history'
        end

        register_instance_option :controller do
          proc do
            @general = false
            @history = @auditing_adapter && @auditing_adapter.listing_for_object(@abstract_model, @object, params[:query], params[:sort], params[:sort_reverse], params[:all], params[:page]) || []

            render @action.template_name
          end
        end

        register_instance_option :template_name do
          :history
        end

        register_instance_option :link_icon do
          'icon-book'
        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/history_show.rb
rails_admin-2.3.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.2.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.2.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.1.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.1.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.0.2 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.4.3 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.0.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.0.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-2.0.0.rc lib/rails_admin/config/actions/history_show.rb
rails_admin-2.0.0.beta lib/rails_admin/config/actions/history_show.rb
rails_admin-1.4.2 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.4.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.4.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.3.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.2.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.1.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.1.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-1.0.0 lib/rails_admin/config/actions/history_show.rb