mirror of https://github.com/mastodon/mastodon
Checking reblog vs original status was happening in multiple places across the app. For views, this logic was encapsulated in a helper method named `proper_status` but in the other layers of the app, the logic was duplicated. Because the logic is used at all layers of the app, we extracted it into a `Status#proper` method on the model and changed all uses of the logic to use this method. There is now a single source of truth for this condition. We added test coverage to untested methods that got refactored. |
8 years ago | |
---|---|---|
.. | ||
concerns | 8 years ago | |
web | 8 years ago | |
.keep | 9 years ago | |
account.rb | 8 years ago | |
application_record.rb | 9 years ago | |
block.rb | 8 years ago | |
domain_block.rb | 8 years ago | |
favourite.rb | 8 years ago | |
feed.rb | 8 years ago | |
follow.rb | 8 years ago | |
follow_request.rb | 8 years ago | |
import.rb | 8 years ago | |
media_attachment.rb | 8 years ago | |
mention.rb | 8 years ago | |
mute.rb | 8 years ago | |
notification.rb | 8 years ago | |
preview_card.rb | 8 years ago | |
remote_follow.rb | 8 years ago | |
report.rb | 8 years ago | |
setting.rb | 8 years ago | |
status.rb | 8 years ago | |
stream_entry.rb | 8 years ago | |
subscription.rb | 9 years ago | |
tag.rb | 8 years ago | |
user.rb | 8 years ago | |
web.rb | 8 years ago |