exclusive-error-message 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fa3de337d955da7bdd0f45402f35cb22c77974c9
4
- data.tar.gz: 160fe8dc77bdaa844dbc1b48de9f478d2a5eb740
2
+ SHA256:
3
+ metadata.gz: 1b28557f708f2b8e1314b2871c873393b7b1a3cdd444fc6a4dffd8dcd925dde6
4
+ data.tar.gz: 6624f0501d2ac48c26a9b7a84efb401f4bcb40866658d375f8f6a42f1d48b507
5
5
  SHA512:
6
- metadata.gz: 043a3a5b0f30fd478c78aee7409d352b7a2e245611da5def98fbe96cd49b54b9a2cf925440e030c4a55045116d13c3b678162aee25196993c49a5b4587165d7d
7
- data.tar.gz: 9172ddc7ee42304d014eb8cffe438a5f6e9ca14a6d66fd83546abfe3147f46d0016b159d85f8c184923d0426139d3f27158543c730278b618f30bfb9eb7534a3
6
+ metadata.gz: 3e1480fa0dabb4176e3cdd40d8b2183a789024c7b2a927b8d4746b475c358bba1ac77e87266931dce7dfe7ffe77b5f812c004ed0ffc3904710137c7085cf167e
7
+ data.tar.gz: 7b39e13ce1b45ca8b96cfeca34b9b15a32d84daaaa055cb5b34b397be7417a2b3e0d05f322344e064c84115afce6c83e596ad5237483b705ccc0092e21d5fd68
@@ -4,7 +4,11 @@
4
4
  module ExclusiveErrorMessage
5
5
  module Extension
6
6
  def full_message(attribute, message)
7
- message.start_with?('_') ? message[1..-1] : super
7
+ if message.respond_to?(:start_with?) && message.start_with?('_') # Support non-string error messages like hashes.
8
+ message[1..-1]
9
+ else
10
+ super
11
+ end
8
12
  end
9
13
  end
10
14
  end
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module ExclusiveErrorMessage
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exclusive-error-message
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Konoplov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2018-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 2.6.8
65
+ rubygems_version: 2.7.6
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: 100% exclusive message for any ActiveModel validation error.