Skip to content

Instantly share code, notes, and snippets.

@Nursultan91
Created May 16, 2017 09:31
Show Gist options
  • Save Nursultan91/7c33e46e9e0047a6817a1bdbc2db8832 to your computer and use it in GitHub Desktop.
Save Nursultan91/7c33e46e9e0047a6817a1bdbc2db8832 to your computer and use it in GitHub Desktop.
Вот что я написал в файле app/admin/user.rb
ActiveAdmin.register User do
permit_params :email, :name, :paid, :user_id
show do |t|
attributes_table do
row :email, label: "Почта"
row :name, label: "Имя"
row :paid, label: "Статус оплаты"
end
end
form :html => { :enctype => "multipart/form-data" } do |f|
f.inputs do
f.input :email, label: "Почта"
f.input :name, label: "Имя"
f.input :paid, label: "Статус оплаты"
end
f.actions
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment