mastodon/app/models
Akihiko Odaki ae871c4d46
Make Array-creation behavior of Paginable more predictable ()
* Make Array-creation behavior of Paginable more predictable

Paginable.paginate_by_id usually returns ActiveRecord::Relation, but it
returns an Array if min_id option is present. The behavior caused problems
fixed with the following commits:
- 552e886b64
- b63ede5005
- 64ef37b89d

To prevent from recurring similar problems, this commit introduces two
changes:
- The scope now always returns an Array whether min_id option is present
  or not.
- The scope is renamed to to_a_paginated_by_id to clarify it returns an
  Array.

* Transform Paginable.to_a_paginated_by_id from a scope to a class method

https://api.rubyonrails.org/classes/ActiveRecord/Scoping/Named/ClassMethods.html#method-i-scope
> The method is intended to return an ActiveRecord::Relation object, which
> is composable with other scopes.

Paginable.to_a_paginated_by_id returns an Array and is not appropriate
as a scope.
..
admin Add ability to filter audit log in admin UI ()
concerns Make Array-creation behavior of Paginable more predictable ()
form Cache result of SQL ()
web Bump doorkeeper from 5.3.3 to 5.4.0 ()
account.rb Add E2EE API ()
account_alias.rb Fix confusing error when failing to add an alias to an unknown account ()
account_conversation.rb Make Array-creation behavior of Paginable more predictable ()
account_domain_block.rb Fix crash when saving invalid domain name ()
account_filter.rb Add sorting by username, creation and last activity in moderation view ()
account_identity_proof.rb Fix Keybase verification using wrong domain for remote accounts ()
account_migration.rb Add (back) option to set redirect notice on account without moving followers ()
account_moderation_note.rb Update dependencies for Ruby (2018-04-23) ()
account_note.rb Add user notes on accounts ()
account_pin.rb Add API endpoint to list featured accounts (fixes ) ()
account_stat.rb Fix account counters being overwritten by parallel writes ()
account_tag_stat.rb Add profile directory ()
account_warning.rb Add moderation warnings ()
account_warning_preset.rb Add titles to warning presets in admin UI ()
admin.rb Add logging of admin actions ()
announcement.rb Change delivery failure tracking to work with hostnames instead of URLs ()
announcement_filter.rb Add announcements ()
announcement_mute.rb Add announcements ()
announcement_reaction.rb Add announcements ()
application_record.rb Fix records not being indexed sometimes ()
backup.rb Add announcements ()
block.rb Store URIs of follows, follow requests and blocks for ActivityPub ()
bookmark.rb Add announcements ()
context.rb Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl ()
conversation.rb Revert "Remove conversation URI ()" ()
conversation_mute.rb Update dependencies for Ruby (2018-04-23) ()
custom_emoji.rb Add separate cache directory for non-local uploads ()
custom_emoji_category.rb Add batch actions and categories to admin UI for custom emojis ()
custom_emoji_filter.rb Various fixes and improvements ()
custom_filter.rb Add “account timeline” filter category ()
device.rb Add E2EE API ()
domain_allow.rb Fix crash when saving invalid domain name ()
domain_block.rb Fix admin page crashing when trying to block an invalid domain name ()
email_domain_block.rb Add option to include resolved DNS records when blacklisting e-mail domains in admin UI ()
encrypted_message.rb Change Redis#exists calls to Redis#exists? to avoid deprecation warning ()
export.rb Export and import show_reblogs together with following list ()
favourite.rb Fix records not being indexed sometimes ()
featured_tag.rb Fix featured tags not finding the right tag on save ()
feed.rb Fix non-numbers being passed to Redis and causing an error ()
follow.rb Add specific rate limits for posting and following ()
follow_request.rb Add specific rate limits for posting and following ()
home_feed.rb Change Redis#exists calls to Redis#exists? to avoid deprecation warning ()
identity.rb Change identities id column to a bigint ()
import.rb Fix csv upload ()
instance.rb Add whitelist mode ()
instance_filter.rb Various fixes and improvements ()
invite.rb Add invite comments ()
invite_filter.rb Various fixes and improvements ()
list.rb Update dependencies for Ruby (2018-04-23) ()
list_account.rb Add abilityto add oneself to lists ()
list_feed.rb Lists ()
marker.rb Add timeline read markers API ()
media_attachment.rb Fix videos with near-60 fps being rejected ()
mention.rb Improve support for aspects/circles ()
message_franking.rb Add E2EE API ()
mute.rb Update dependencies for Ruby (2018-04-23) ()
notification.rb Add follow_request notification type ()
one_time_key.rb Add E2EE API ()
poll.rb Only normalize local polls ()
poll_vote.rb Add optimistic lock to avoid race conditions when handling votes ()
preview_card.rb Add blurhash to preview cards ()
relationship_filter.rb Fix followings list order | Issue ()
relay.rb Fix enable/disable relay failures ()
remote_follow.rb Refactor monkey-patching of Goldfinger ()
report.rb Add rate limit for reporting ()
report_filter.rb Various fixes and improvements ()
report_note.rb Fix scope latest of ReportNote ()
scheduled_status.rb Fix deleting a scheduled status immediately deleting media attachments ()
search.rb Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl ()
session_activation.rb Update dependencies for Ruby (2018-04-23) ()
setting.rb Remove intermediary arrays when creating hash maps from results ()
site_upload.rb Improvements to image upload validation and creation ()
status.rb Fix searchable status without explicitly mentioning it ()
status_pin.rb Update dependencies for Ruby (2018-04-23) ()
status_stat.rb Reset status cache when status_stat or media_attachment updates ()
system_key.rb Add E2EE API ()
tag.rb Fixes featured hashtag setting page erroring out instead of rejecting invalid tags ()
tag_filter.rb Various fixes and improvements ()
tombstone.rb Record deleted(by mod) status to prevent re-appear ()
trending_tags.rb Fix admin setting to auto-approve hashtags not affecting query ()
unavailable_domain.rb Change delivery failure tracking to work with hostnames instead of URLs ()
user.rb Add WebAuthn as an alternative 2FA method ()
user_invite_request.rb Add "why do you want to join" field to invite requests ()
web.rb Add extended about page stub
webauthn_credential.rb Add WebAuthn as an alternative 2FA method ()