mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Brakeman warns on implicit to_s
result
This commit is contained in:
parent
59a8d26d31
commit
68abd26c25
|
@ -14,7 +14,7 @@ class AnnualReport::StatusesPerAccountCount < ApplicationRecord
|
||||||
def self.refresh(year)
|
def self.refresh(year)
|
||||||
connection.exec_query(<<~SQL.squish)
|
connection.exec_query(<<~SQL.squish)
|
||||||
INSERT INTO #{table_name} (year, account_id, statuses_count)
|
INSERT INTO #{table_name} (year, account_id, statuses_count)
|
||||||
#{AccountStatusCountQuery.new(year)}
|
#{AccountStatusCountQuery.new(year).to_sql}
|
||||||
ON CONFLICT (year, account_id) DO NOTHING
|
ON CONFLICT (year, account_id) DO NOTHING
|
||||||
SQL
|
SQL
|
||||||
end
|
end
|
||||||
|
@ -24,7 +24,7 @@ class AnnualReport::StatusesPerAccountCount < ApplicationRecord
|
||||||
@year = year
|
@year = year
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_sql
|
||||||
Status
|
Status
|
||||||
.unscoped
|
.unscoped
|
||||||
.local
|
.local
|
||||||
|
|
Loading…
Reference in New Issue
Block a user