Change how hashtags are normalized (#18795)
* Change how hashtags are normalized * Fix tests
This commit is contained in:
parent
12ed2d793b
commit
e7aa2be828
29 changed files with 193 additions and 51 deletions
|
@ -16,6 +16,8 @@ module Admin
|
|||
if @tag.update(tag_params.merge(reviewed_at: Time.now.utc))
|
||||
redirect_to admin_tag_path(@tag.id), notice: I18n.t('admin.tags.updated_msg')
|
||||
else
|
||||
@time_period = (6.days.ago.to_date...Time.now.utc.to_date)
|
||||
|
||||
render :show
|
||||
end
|
||||
end
|
||||
|
@ -27,7 +29,7 @@ module Admin
|
|||
end
|
||||
|
||||
def tag_params
|
||||
params.require(:tag).permit(:name, :trendable, :usable, :listable)
|
||||
params.require(:tag).permit(:name, :display_name, :trendable, :usable, :listable)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,9 +13,7 @@ class Api::V1::FeaturedTagsController < Api::BaseController
|
|||
end
|
||||
|
||||
def create
|
||||
@featured_tag = current_account.featured_tags.new(featured_tag_params)
|
||||
@featured_tag.reset_data
|
||||
@featured_tag.save!
|
||||
@featured_tag = current_account.featured_tags.create!(featured_tag_params)
|
||||
render json: @featured_tag, serializer: REST::FeaturedTagSerializer
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ class Settings::FeaturedTagsController < Settings::BaseController
|
|||
|
||||
def create
|
||||
@featured_tag = current_account.featured_tags.new(featured_tag_params)
|
||||
@featured_tag.reset_data
|
||||
|
||||
if @featured_tag.save
|
||||
redirect_to settings_featured_tags_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue