mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: rename action_code_href to action_code_path (#14834)
Small actions should use path instead of absolute url. getURL function is necessary to insert a potential subfolder prefix.
This commit is contained in:

committed by
GitHub

parent
fc98d1edfa
commit
8b93da9fe0
@ -29,7 +29,7 @@ class UserActionSerializer < ApplicationSerializer
|
||||
:post_type,
|
||||
:action_code,
|
||||
:action_code_who,
|
||||
:action_code_href,
|
||||
:action_code_path,
|
||||
:edit_reason,
|
||||
:category_id,
|
||||
:closed,
|
||||
@ -91,12 +91,12 @@ class UserActionSerializer < ApplicationSerializer
|
||||
object.action_code_who
|
||||
end
|
||||
|
||||
def include_action_code_href?
|
||||
action_code_href.present?
|
||||
def include_action_code_path?
|
||||
action_code_path.present?
|
||||
end
|
||||
|
||||
def action_code_href
|
||||
object.action_code_href
|
||||
def action_code_path
|
||||
object.action_code_path
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user