Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 679 Bytes

File metadata and controls

33 lines (27 loc) · 679 Bytes

Section used for the export view.

It inherits its configuration from the base section.

Specify fields to export

RailsAdmin.config do |config|
  config.model 'Highway' do
    export do
      field :number_of_lanes
    end
  end
end

Specify field Value to export with 'export_value'

  RailsAdmin.config do |config|
    config.model 'Lesson' do
      export do
        field :teacher, :string do
          export_value do
            value.name if value #value is an instance of Teacher
          end
        end
      end
    end
  end

More here