diff options
author | Lain Iwakura <lain@soykaf.club> | 2017-11-14 17:56:38 +0100 |
---|---|---|
committer | Lain Iwakura <lain@soykaf.club> | 2017-11-14 17:56:38 +0100 |
commit | ca5440b93df514659eacde4ce562e459643dedc3 (patch) | |
tree | 31ab1d8fad8d6ecf7897eda673c4d76646532409 /app/serializers | |
parent | dae8916544d0a9cee5d998b10bc5cf36f144b727 (diff) |
Rename MAX_CHARS to MAX_TOOT_CHARS to be more specific.
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/initial_state_serializer.rb | 4 | ||||
-rw-r--r-- | app/serializers/rest/instance_serializer.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 4550b344e..b4bdb326b 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -3,11 +3,11 @@ class InitialStateSerializer < ActiveModel::Serializer attributes :meta, :compose, :accounts, :media_attachments, :settings, :push_subscription, - :max_chars + :max_toot_chars has_many :custom_emojis, serializer: REST::CustomEmojiSerializer - def max_chars + def max_toot_chars StatusLengthValidator::MAX_CHARS end diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index 52c161cb4..abbacc374 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -4,7 +4,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer include RoutingHelper attributes :uri, :title, :description, :email, - :version, :urls, :stats, :thumbnail, :max_chars + :version, :urls, :stats, :thumbnail, :max_toot_chars def uri Rails.configuration.x.local_domain @@ -30,7 +30,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer full_asset_url(instance_presenter.thumbnail.file.url) if instance_presenter.thumbnail end - def max_chars + def max_toot_chars StatusLengthValidator::MAX_CHARS end |