mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-14 10:54:27 +00:00
115dab78f1
Fix #271 Add back the `GET /api/v1/trends` API with the caveat that it does not return tags that have not been allowed to trend by the staff. When a hashtag begins to trend (internally) and that hashtag has not been previously reviewed by the staff, the staff is notified. The new admin UI for hashtags allows filtering hashtags by where they are used (e.g. in the profile directory), whether they have been reviewed or are pending reviewal, they show by how many people the hashtag is used in the directory, how many people used it today, how many statuses with it have been created today, and it allows fixing the name of the hashtag to make it more readable. The disallowed hashtags feature has been reworked. It is now controlled from the admin UI for hashtags instead of from the file `config/settings.yml`
18 lines
280 B
Ruby
18 lines
280 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ApplicationRecord < ActiveRecord::Base
|
|
self.abstract_class = true
|
|
|
|
include Remotable
|
|
|
|
def boolean_with_default(key, default_value)
|
|
value = attributes[key]
|
|
|
|
if value.nil?
|
|
default_value
|
|
else
|
|
value
|
|
end
|
|
end
|
|
end
|