feature/share-libs
rb 42 lines 699 Bytes
Raw
1 ActiveAdmin.register AlbumProvider do
2 menu priority: 3, parent: 'Music Database'
3 permit_params :album_id, :user_id
4
5 index do
6 selectable_column
7 column :name
8 column :provider_type
9 column :user do |album|
10 album.user.email
11 end
12 column :album
13 column :views_count
14 actions
15 end
16
17 filter :name
18 filter :provider_type
19 filter :user
20 filter :album
21 filter :created_at
22 filter :updated_at
23
24 show do
25 attributes_table do
26 row :name
27 row :provider_type
28 row :user
29 row :album
30 row :created_at
31 row :updated_at
32 end
33 end
34
35 form do |f|
36 f.inputs do
37 f.input :name
38 f.input :album
39 end
40 f.actions
41 end
42 end