Sha256: efe42413255d6bc66c248e904d3593f949c7cfaee3945514e46b865213286af3

Contents?: true

Size: 965 Bytes

Versions: 24

Compression:

Stored size: 965 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.new 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

24 entries across 24 versions & 3 rubygems

Version Path
rails_admin-0.6.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.5.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.9 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.8 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.7 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.6 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.5 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.4 lib/rails_admin/config/actions/history_show.rb
rails_admin-lbgraham-0.4.2 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.3 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.2 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.4.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.3.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.2.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.1.2 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.1.1 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.1.0 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.0.5 lib/rails_admin/config/actions/history_show.rb
rails_admin-0.0.4 lib/rails_admin/config/actions/history_show.rb