Этот коммит содержится в:
Mattia Roccoberton
2020-09-01 11:17:38 +02:00
родитель 7a148c7cd1
Коммит a43a4ff0ba
4 изменённых файлов: 80 добавлений и 2 удалений

Просмотреть файл

@@ -1,4 +1,49 @@
# frozen_string_literal: true
ActiveAdmin.register Post do
permit_params :author_id, :title, :description, :category, :dt, :position, :published, tag_ids: []
index do
selectable_column
id_column
column :title
column :author
column :published
column :created_at
actions
end
show do
attributes_table do
row :author
row :title
row :description
row :category
row :dt
row :position
row :published
row :tags
row :created_at
row :updated_at
end
active_admin_comments
end
form do |f|
f.inputs 'Post' do
f.input :author
f.input :title
f.input :description, as: :quill_editor
f.input :category
f.input :dt
f.input :position
f.input :published
end
f.inputs 'Tags' do
f.input :tags
end
f.actions
end
end

Просмотреть файл

@@ -1 +1,4 @@
//= require active_admin/base
//= require activeadmin/quill_editor/quill
//= require activeadmin/quill_editor_input

Просмотреть файл

@@ -8,8 +8,10 @@
// $sidebar-width: 242px;
// Active Admin's got SASS!
@import "active_admin/mixins";
@import "active_admin/base";
@import 'active_admin/mixins';
@import 'active_admin/base';
@import 'activeadmin/quill_editor_input';
// Overriding any non-variable SASS must be done after the fact.
// For example, to change the default status-tag color: