fix: help center clearing minor bugs (#5075)
This commit is contained in:
parent
32291f4f7d
commit
5727928600
5 changed files with 12 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
# id :bigint not null, primary key
|
||||
# content :text
|
||||
# description :text
|
||||
# meta :jsonb
|
||||
# status :integer
|
||||
# title :string
|
||||
# views :integer
|
||||
|
|
|
@ -25,3 +25,5 @@ if category.root_category.present?
|
|||
json.partial! 'api/v1/accounts/categories/associated_category.json.jbuilder', category: category.root_category
|
||||
end
|
||||
end
|
||||
|
||||
json.articles_count category.articles.published.try(:count)
|
||||
|
|
|
@ -23,3 +23,5 @@ if category.root_category.present?
|
|||
json.partial! partial: 'associated_category', category: category.root_category
|
||||
end
|
||||
end
|
||||
|
||||
json.articles_count category.articles.published.try(:count)
|
||||
|
|
5
db/migrate/20220720080126_add_meta_column_to_article.rb
Normal file
5
db/migrate/20220720080126_add_meta_column_to_article.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddMetaColumnToArticle < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :articles, :meta, :jsonb, default: {}
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2022_07_18_123938) do
|
||||
ActiveRecord::Schema.define(version: 2022_07_20_080126) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
|
@ -128,6 +128,7 @@ ActiveRecord::Schema.define(version: 2022_07_18_123938) do
|
|||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.bigint "author_id"
|
||||
t.bigint "associated_article_id"
|
||||
t.jsonb "meta", default: {}
|
||||
t.index ["associated_article_id"], name: "index_articles_on_associated_article_id"
|
||||
t.index ["author_id"], name: "index_articles_on_author_id"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue