Skip to content

Commit

Permalink
Use hash keyword method lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
delonnewman committed Oct 9, 2024
1 parent 937d23f commit b60d1a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/surveys_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def settings
def open
survey.open!

render partial: 'workspace/survey_card', locals: { survey: survey }
render partial: 'workspace/survey_card', locals: { survey: }
end

def close
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/workspace_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class WorkspaceController < ApplicationController
def index
overview = Dragnet::OverviewPresenter.new(current_user.workspace)

render :index, locals: { overview: overview }
render :index, locals: { overview: }
end

def surveys
listing = Dragnet::SurveyListingPresenter.new(current_user.workspace, params)

render :surveys, locals: { listing: listing }
render :surveys, locals: { listing: }
end
end
2 changes: 1 addition & 1 deletion app/presenters/dragnet/survey_listing_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def surveys = user.surveys.order(updated_at: :desc).offset(pager.offset).limit(p
memoize :surveys

# @return [Pagy]
def pager = Pagy.new(count: user.surveys.count, page: page, items: items)
def pager = Pagy.new(count: user.surveys.count, page:, items:)
memoize :pager

# Return reply data for the given survey
Expand Down

0 comments on commit b60d1a5

Please sign in to comment.