Sha256: 1d9dcdabf875da301f7c9e9607de065f819cf20c2046bcd009f0c07d71c94cc2

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

ActiveAdmin.register <%= class_name %> do

  # See permitted parameters documentation:
  # https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
  #
  # permit_params :list, :of, :attributes, :on, :model
  #
  # or
  #
  # permit_params do
  #   permitted = [:permitted, :attributes]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end
  <% if options.include_boilerplate? %>
  # Limit actions available to your users by adding them to the 'except' array
  # actions :all, except: []

  # Add or remove filters (you can use any ActiveRecord scope) to toggle their
  # visibility in the sidebar
  <%= @boilerplate.filters %>

  # Add or remove columns to toggle their visiblity in the index action
  # index do
  #   selectable_column
  #   id_column
  <%= @boilerplate.columns %>
  #   actions
  # end

  # Add or remove rows to toggle their visiblity in the show action
  # show do |<%= class_name.downcase %>|
  <%= @boilerplate.rows %>
  # end

  # Add or remove fields to toggle their visibility in the form
  # form do |f|
  #   f.inputs do
  <%= @boilerplate.form_inputs %>
  #   end
  #   f.actions
  # end
  <% end %>
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeadmin-2.2.0 lib/generators/active_admin/resource/templates/admin.rb.erb