diff options
author | James Lopez <james@jameslopez.es> | 2017-06-22 13:10:28 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 12:41:42 +0300 |
commit | 0ee002c70ea3711046b8d254b5cba044762e9c05 (patch) | |
tree | fe61f06a538f4d43e36ce5d68f8627cb51ceb5e8 /app/services/users | |
parent | 4c75fe5dfe898b7c4882c88364df936460891e2a (diff) |
more refactoring
Diffstat (limited to 'app/services/users')
-rw-r--r-- | app/services/users/update_service.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/users/update_service.rb b/app/services/users/update_service.rb index 56e8739ab5e..33f3686c8d5 100644 --- a/app/services/users/update_service.rb +++ b/app/services/users/update_service.rb @@ -17,10 +17,12 @@ module Users end end - def execute!(skip_authorization: false, &block) + def execute!(*args, &block) result = execute(*args, &block) - raise SomeCustomException(result[:message]) unless result[:status] == :success + raise ActiveRecord::RecordInvalid(result[:message]) unless result[:status] == :success + + true end private |