diff --git a/Gemfile.lock b/Gemfile.lock index 2535521..99bf685 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rest_my_case (2.0.2) + rest_my_case (2.0.3) object_attorney (>= 3.0.6) GEM @@ -24,7 +24,7 @@ GEM json (1.8.3) method_source (0.8.2) multi_json (1.12.1) - object_attorney (3.0.6) + object_attorney (3.0.7) activemodel (>= 3.0.0) parser (2.3.0.6) ast (~> 2.2) diff --git a/lib/rest_my_case/validator.rb b/lib/rest_my_case/validator.rb index c37ed34..3c8b365 100644 --- a/lib/rest_my_case/validator.rb +++ b/lib/rest_my_case/validator.rb @@ -19,6 +19,8 @@ def self.target(name, options = {}) self.silence_dependencies_abort = true def perform + return if defendant_options.empty? + error('unprocessable_entity') if invalid? end end diff --git a/lib/rest_my_case/version.rb b/lib/rest_my_case/version.rb index 6b6a287..cda5da2 100644 --- a/lib/rest_my_case/version.rb +++ b/lib/rest_my_case/version.rb @@ -1,3 +1,3 @@ module RestMyCase - VERSION = '2.0.2'.freeze + VERSION = '2.0.3'.freeze end