fix: Add slug to articles (#5500)
This commit is contained in:
@@ -42,8 +42,8 @@ class Api::V1::Accounts::ArticlesController < Api::V1::Accounts::BaseController
|
||||
|
||||
def article_params
|
||||
params.require(:article).permit(
|
||||
:title, :content, :description, :position, :category_id, :author_id, :associated_article_id, :status, meta: [:title, :description,
|
||||
{ tags: [] }]
|
||||
:title, :slug, :content, :description, :position, :category_id, :author_id, :associated_article_id, :status, meta: [:title, :description,
|
||||
{ tags: [] }]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
# content :text
|
||||
# description :text
|
||||
# meta :jsonb
|
||||
# slug :string not null
|
||||
# status :integer
|
||||
# title :string
|
||||
# views :integer
|
||||
@@ -22,6 +23,7 @@
|
||||
#
|
||||
# index_articles_on_associated_article_id (associated_article_id)
|
||||
# index_articles_on_author_id (author_id)
|
||||
# index_articles_on_slug (slug)
|
||||
#
|
||||
class Article < ApplicationRecord
|
||||
include PgSearch::Model
|
||||
|
||||
Reference in New Issue
Block a user