add message model and migration

This commit is contained in:
bijan
2022-05-12 19:44:54 +04:30
parent a6721fed75
commit 0185ac276c
7 changed files with 67 additions and 3 deletions

View File

@ -0,0 +1,22 @@
ActiveAdmin.register Message do
csv do
column :title
column(:email)
column('bODY', humanize_name: false) # preserve case
end
# See permitted parameters documentation:
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
#
# Uncomment all parameters which should be permitted for assignment
#
permit_params :title, :description, :email, :phone
#
# or
#
# permit_params do
# permitted = [:title, :description, :email, :phone]
# permitted << :other if params[:action] == 'create' && current_user.admin?
# permitted
# end
end

2
app/models/message.rb Normal file
View File

@ -0,0 +1,2 @@
class Message < ApplicationRecord
end