Skip to content

Commit

Permalink
Abort instead of returning false in state change
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp committed Nov 13, 2022
1 parent b352da8 commit 9cd3571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/state_change.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def machine_type=(class_name)
protected

def prevent_update
false
throw(:abort)
end

def update_machine_state
# Prevent saving if the method have not been redefined in the subclass
false
throw(:abort)
end

def notify_state
Expand Down

0 comments on commit 9cd3571

Please sign in to comment.