Skip to content

Commit

Permalink
残りはrubocop:todoを付ける
Browse files Browse the repository at this point in the history
  • Loading branch information
takayamaki committed Jan 4, 2025
1 parent 6fcdf8f commit b5c1bea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/statuses_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def update_trend_tags

private

def get_data
def get_data # rubocop:todo Naming/AccessorMethodName
redis.hset('trend_tags_management_data', 'updated_at', Time.now.utc.as_json) unless redis.exists('trend_tags_management_data')
[
aggregate_tags_in,
Expand Down Expand Up @@ -81,7 +81,7 @@ def score_trend(level: 0, level_last: 0.0, trend_last: 0.0, gamma: 0.3)
[(gamma * (level - level_last)) + ((1 - gamma) * trend_last), 0].max # return 0 if trend is negative
end

def aggregate_tags_in(t: 10.minutes, until_t: Time.now.utc)
def aggregate_tags_in(t: 10.minutes, until_t: Time.now.utc) # rubocop:todo Naming/MethodParameterName
status_ids = status_ids_in((until_t - t)..until_t)
StatusesTag.where(status_id: status_ids).group(:tag_id).count.transform_keys(&:to_s)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class AddVisibilityToFavouriteTags < ActiveRecord::Migration[5.1]
def change
add_column :favourite_tags, :visibility, :integer, null: false, default: 0

FavouriteTag.update_all(visibility: FavouriteTag.visibilities[:public])
FavouriteTag.update_all(visibility: FavouriteTag.visibilities[:public]) # rubocop:todo Rails/SkipsModelValidations
end
end

0 comments on commit b5c1bea

Please sign in to comment.