Skip to content

Commit

Permalink
use default activity && bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Dim145 committed Mar 29, 2024
1 parent 2047576 commit be50063
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app/controllers/activities_applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ def new
.transform_values { |values| values.max_by { |ar| ar["display_price"] } }
.values

# If default activityRef is set, we replace the activityRef (id) with the default one
display_activity_refs.each do |ar|
default = ActivityRefKind.find_by(id: ar["activity_ref_kind_id"])&.default_activity_ref

if default
ar["id"] = default.id
end
end

@activity_refs = display_activity_refs
.flatten
.sort_by { |a| a["kind"] }
Expand Down
2 changes: 1 addition & 1 deletion lib/elvis/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Elvis
VERSION = "2.2.9"
VERSION = "2.2.10"
end

0 comments on commit be50063

Please sign in to comment.