Add private method for event export filename (#38454)
This commit is contained in:
1 parent
ab5cbe3509
commit
df9dec741f
3 files changed
+30
-2
No files matched your search
@@ -13,13 +13,13 @@ class SeveredRelationshipsController < ApplicationController
|
||||
|
||||
def following
|
||||
respond_to do |format|
|
||||
format.csv { send_data following_data, filename: "following-#{@event.target_name}-#{@event.created_at.to_date.iso8601}.csv" }
|
||||
format.csv { send_data following_data, filename: }
|
||||
end
|
||||
end
|
||||
|
||||
def followers
|
||||
respond_to do |format|
|
||||
format.csv { send_data followers_data, filename: "followers-#{@event.target_name}-#{@event.created_at.to_date.iso8601}.csv" }
|
||||
format.csv { send_data followers_data, filename: }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,4 +48,8 @@ class SeveredRelationshipsController < ApplicationController
|
||||
def acct(account)
|
||||
account.local? ? account.local_username_and_domain : account.acct
|
||||
end
|
||||
|
||||
def filename
|
||||
"#{action_name}-#{@event.identifier}.csv"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user