Skip to content

Commit

Permalink
reuse constant and remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
victormours committed Mar 4, 2025
1 parent 7aed820 commit 5bf79db
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/form_models/user_rdv_wizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,14 @@ def to_query
motif_id: rdv.motif.id, starts_at: rdv.starts_at.to_s, user_ids: rdv.users&.map(&:id), rdv_collectif_id: rdv.id,
}.merge(
@attributes.slice(
:where, :departement, :lieu_id, :latitude, :longitude, :city_code, :street_ban_id,
:address, :organisation_ids, :public_link_organisation_id, :user_selected_organisation_id,
*WebSearchContext::ADDRESS_SELECTION_PARAMS,
:where, :lieu_id,
:organisation_ids, :public_link_organisation_id, :user_selected_organisation_id,
:referent_ids, :external_organisation_ids, :duration
)
)
end

def to_search_query
@attributes
.slice(:departement, :latitude, :longitude, :motif_name_with_location_type, :where, :city_code, :street_ban_id)
.merge(service: @rdv.motif.service_id, motif_name_with_location_type: @rdv.motif.name_with_location_type)
end

def save
true
end
Expand Down

0 comments on commit 5bf79db

Please sign in to comment.