From 5b022be9da60bc6d278cb119a5a7f20da44814e9 Mon Sep 17 00:00:00 2001 From: leenasn Date: Fri, 6 Nov 2015 15:23:53 +0530 Subject: [PATCH] Remove unwanted fields from admin view, along with edit and new action --- app/admin/device.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/admin/device.rb b/app/admin/device.rb index 52bd8bd..a465318 100644 --- a/app/admin/device.rb +++ b/app/admin/device.rb @@ -1,5 +1,7 @@ ActiveAdmin.register Device do + actions :all, except: [:edit,:new] + # See permitted parameters documentation: # https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters # @@ -12,6 +14,13 @@ ActiveAdmin.register Device do # permitted << :other if resource.something? # permitted # end - + index do + selectable_column + id_column + column "Model Name",:model + column :created_at + column :updated_at + actions + end end