feature/share-libs
rb 43 lines 851 Bytes
Raw
1 ActiveAdmin.register ChordHistory do
2 menu priority: 8, parent: 'Music Database'
3 permit_params :chord_id, :user_id, :name
4 actions :all, except: %i[edit destroy]
5 config.clear_action_items!
6
7 index do
8 selectable_column
9 column :chord
10 column :user
11 column :name
12 column :created_at
13 column :updated_at
14 actions
15 end
16
17 filter :chord
18 filter :user
19 filter :name
20 filter :created_at
21 filter :updated_at
22
23 show do
24 attributes_table do
25 row :chord
26 row :user
27 row :name
28 row :created_at
29 row :updated_at
30 end
31 end
32
33 form do |f|
34 f.inputs do
35 f.input :chord, include_blank: false, selected: params[:chord_id]
36 f.input :user, include_blank: false, selected: params[:user_id]
37 f.input :name
38 f.input :created_at
39 f.input :updated_at
40 end
41 actions
42 end
43 end