Sha256: ff4c9a7f5ea13bba134bd94b9fabff2abb9eadd974967fa3e960e166eea237df

Contents?: true

Size: 825 Bytes

Versions: 12

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

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

        register_instance_option :member do
          true
        end

        register_instance_option :route_fragment do
          ''
        end

        register_instance_option :breadcrumb_parent do
          [:index, bindings[:abstract_model]]
        end

        register_instance_option :controller do
          proc do
            respond_to do |format|
              format.json { render json: @object }
              format.html { render @action.template_name }
            end
          end
        end

        register_instance_option :link_icon do
          'fas fa-info-circle'
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_admin-3.2.1 lib/rails_admin/config/actions/show.rb
rails_admin-3.2.0 lib/rails_admin/config/actions/show.rb
rails_admin-3.2.0.rc lib/rails_admin/config/actions/show.rb
rails_admin-3.2.0.beta lib/rails_admin/config/actions/show.rb
rails_admin-3.1.4 lib/rails_admin/config/actions/show.rb
rails_admin-3.1.3 lib/rails_admin/config/actions/show.rb
rails_admin-3.1.2 lib/rails_admin/config/actions/show.rb
rails_admin-3.1.1 lib/rails_admin/config/actions/show.rb
rails_admin-3.1.0 lib/rails_admin/config/actions/show.rb
rails_admin-3.1.0.rc2 lib/rails_admin/config/actions/show.rb
rails_admin-3.1.0.rc lib/rails_admin/config/actions/show.rb
rails_admin-3.1.0.beta lib/rails_admin/config/actions/show.rb