Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlindsey committed Feb 13, 2023
1 parent d16b76d commit e06691f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ def index
@projects = Project.active
respond_to do |format|
format.html { @events = Event.upcoming_events(specified_project) }
format.json { @events = Event.upcoming_events(specified_project)
@scrums = EventInstance.this_month_until_now }
format.json do
@events = Event.upcoming_events(specified_project)
@scrums = EventInstance.this_month_until_now
end
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/models/event_instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def channels_for_event
def self.this_month_until_now
beginning_of_month = Date.current.at_beginning_of_month
EventInstance
.where('created_at BETWEEN ? AND ?', beginning_of_month, DateTime.current)
.order(created_at: :desc)
.where('created_at BETWEEN ? AND ?', beginning_of_month, DateTime.current)
.order(created_at: :desc)
end

private
Expand Down
1 change: 1 addition & 0 deletions app/views/events/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

date_format = '%Y-%m-%dT%H:%M:%S'
json.array! @scrums do |scrum|
json.title scrum.title
Expand Down

0 comments on commit e06691f

Please sign in to comment.