2014-03-22 18:21:45 +01:00
|
|
|
ActiveAdmin.register Channel do
|
|
|
|
|
|
|
|
filter :name
|
|
|
|
filter :description
|
|
|
|
filter :created_at
|
|
|
|
|
|
|
|
permit_params :name, :public_flag
|
|
|
|
|
|
|
|
index do
|
|
|
|
column :id
|
|
|
|
column(:name) { |channel| link_to channel.name, channel }
|
|
|
|
column(:user) { |channel| link_to channel.user.login, admin_user_path(channel.user) if channel.user.present? }
|
|
|
|
column :public_flag
|
|
|
|
column :created_at
|
2014-10-06 17:42:02 +02:00
|
|
|
actions
|
2014-03-22 18:21:45 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
form do |f|
|
|
|
|
f.semantic_errors *f.object.errors.keys
|
|
|
|
f.inputs :name, :public_flag
|
|
|
|
f.actions
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|