mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 23:20:33 +08:00
3c019b1c0f
Before this change, links which required full reload because they are not in ember routes like `/my/preferences` or links to docs like `/pub/*` were treated as real external links. Therefore, they were opening in self window or new tab based on user `external_links_in_new_tab` setting. To be consistent with behavior when full reload links are in the post, they are treated as internal and always open in the same window.
14 lines
252 B
Ruby
14 lines
252 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SidebarUrlSerializer < ApplicationSerializer
|
|
attributes :id, :name, :value, :icon, :external, :full_reload, :segment
|
|
|
|
def external
|
|
object.external?
|
|
end
|
|
|
|
def full_reload
|
|
object.full_reload?
|
|
end
|
|
end
|