Sha256: 5f45386c3ae3c5820444c9470405cbdf3af160e32d7f2a8f5603a622b2431716

Contents?: true

Size: 1005 Bytes

Versions: 5

Compression:

Stored size: 1005 Bytes

Contents

ActiveAdmin.register <%= class_name %> do
  # Specify parameters which should be permitted for assignment
  permit_params <%= permit_params %>

  # or consider:
  #
  # permit_params do
  #   permitted = [<%= permit_params %>]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end

  # For security, limit the actions that should be available
  actions :all, except: []

  # Add or remove filters to toggle their visibility
  <%= filters %>

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

  # Add or remove rows to toggle their visiblity in the show action
  show do
    attributes_table_for(resource) do
      <%= rows %>
    end
  end

  # Add or remove fields to toggle their visibility in the form
  form do |f|
    f.semantic_errors(*f.object.errors.attribute_names)
    f.inputs do
      <%= form_inputs %>
    end
    f.actions
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activeadmin-4.0.0.beta5 lib/generators/active_admin/resource/templates/resource.rb.erb
activeadmin-4.0.0.beta4 lib/generators/active_admin/resource/templates/resource.rb.erb
activeadmin-4.0.0.beta3 lib/generators/active_admin/resource/templates/resource.rb.erb
activeadmin-4.0.0.beta2 lib/generators/active_admin/resource/templates/resource.rb.erb
activeadmin-4.0.0.beta1 lib/generators/active_admin/resource/templates/resource.rb.erb