Skip to content

Commit

Permalink
refactor call command method
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Apr 10, 2024
1 parent 8d81df7 commit eef32b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def initialize(form, code_group)
end

def call
return broadcast(:invalid) if @form.invalid?
return broadcast(:invalid) if form.invalid?

transaction do
update_code_group
end

broadcast(:ok, @code_group)
broadcast(:ok, code_group)
end

private
Expand Down

0 comments on commit eef32b9

Please sign in to comment.