Skip to content

Commit

Permalink
resolve Rails/Date cop
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelglass committed Jan 2, 2020
1 parent cbd8dbb commit adf4b32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,6 @@ RSpec/SubjectStub:
Exclude:
- 'spec/models/event_spec.rb'

# Offense count: 4
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/Date:
Exclude:
- 'app/controllers/organizations_controller.rb'

# Offense count: 17
# Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/organizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def download_subscriptions
@organization = Organization.find(params[:organization_id])
authorize @organization, :manage_organization?

filename = "#{@organization.name.downcase.sub(' ', '_')}_subscribed_users_#{Date.today.strftime('%Y_%m_%d')}"
filename = "#{@organization.name.downcase.sub(' ', '_')}_subscribed_users_#{Time.zone.today.strftime('%Y_%m_%d')}"

respond_to do |format|
format.csv { send_data @organization.subscription_csv, filename: filename }
Expand Down

0 comments on commit adf4b32

Please sign in to comment.