Fix is_sensitive error
This commit is contained in:
parent
34f0ad7ad5
commit
f6e82effe6
1 changed files with 5 additions and 0 deletions
|
@ -9,6 +9,7 @@ class REST::CustomEmojiSerializer < ActiveModel::Serializer
|
||||||
attribute :width, if: :width?
|
attribute :width, if: :width?
|
||||||
attribute :height, if: :height?
|
attribute :height, if: :height?
|
||||||
attribute :aliases, if: :aliases?
|
attribute :aliases, if: :aliases?
|
||||||
|
attribute :is_sensitive, if: :is_sensitive?
|
||||||
|
|
||||||
def url
|
def url
|
||||||
full_asset_url(object.image.url)
|
full_asset_url(object.image.url)
|
||||||
|
@ -45,4 +46,8 @@ class REST::CustomEmojiSerializer < ActiveModel::Serializer
|
||||||
def aliases?
|
def aliases?
|
||||||
object.respond_to?(:aliases) && object.aliases.present?
|
object.respond_to?(:aliases) && object.aliases.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def is_sensitive? # rubocop:disable Naming/PredicateName
|
||||||
|
object.respond_to?(:is_sensitive)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue