optimism 0.2.12 → 0.2.13

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
2
  SHA256:
3
- metadata.gz: d4847fe08861efa42698ce30c5c1d7a52b31007c61be8b9bb9b23058c170d4c1
4
- data.tar.gz: 69e2910e1a91580516a98f051ef5589d1836cdf6f5bce0dd7222cc211ccaa383
3
+ metadata.gz: 9a935699b3be00235a60d3b448b7775e08030da7abe09670355aec835af702c5
4
+ data.tar.gz: 50e405ae5b908b30f60142b5221db85e605f56ae82d031df36a9883b7f6bd922
5
5
  SHA512:
6
- metadata.gz: ea79b92e27f01f7b9956d9af05f6a3f5abb474f16d919aa1c034b984a74fd7bf90bfb5874b42f10774bb0caf3864853a20bfe3d271010a5510d5f885395e58b9
7
- data.tar.gz: 7102ad961b9f4052639422f616237be25ffa4e5ac132807c1be50a42aa46c3d0015fecb063a1eadd89e7fcb552bc3d363fcf55b55b713514ab2414e3a5fd5303
6
+ metadata.gz: 4776e29d1d7130b60d4329f5355e56d18493e3c247fa38c0ec07ceaeece56b1a7d97e53dd8f46241eb55a1b27b1a8166d73cde19187276b2bec97f5cafab7023
7
+ data.tar.gz: b0ae31af7e811160209be5af0a7c88c459abd6f8302201fe9fc52fff0fd39ad3702286ea533b216bb65053030eb0ea6c56b3dd757e6ab70d2498216bc1ae0007
@@ -71,7 +71,7 @@ module Optimism
71
71
  resource += "_#{ancestry.shift}_attributes_#{ancestry.shift}" until ancestry.empty?
72
72
  container_selector, error_selector = Optimism.container_selector.sub("RESOURCE", resource).sub("ATTRIBUTE", attribute), Optimism.error_selector.sub("RESOURCE", resource).sub("ATTRIBUTE", attribute)
73
73
  if model.errors.messages.map(&:first).include?(attribute.to_sym)
74
- message = "#{model.errors.full_message(attribute.humanize, model.errors.messages[attribute.to_sym].first)}#{Optimism.suffix}"
74
+ message = "#{model.errors.full_message(attribute.to_sym, model.errors.messages[attribute.to_sym].first)}#{Optimism.suffix}"
75
75
  cable_ready[Optimism.channel].dispatch_event(name: "optimism:attribute:invalid", detail: {resource: resource, attribute: attribute, text: message}) if Optimism.emit_events
76
76
  cable_ready[Optimism.channel].add_css_class(selector: container_selector, name: Optimism.error_class) if Optimism.add_css
77
77
  cable_ready[Optimism.channel].text_content(selector: error_selector, text: message) if Optimism.inject_inline
@@ -1,3 +1,3 @@
1
1
  module Optimism
2
- VERSION = "0.2.12"
2
+ VERSION = "0.2.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - leastbad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-06 00:00:00.000000000 Z
11
+ date: 2020-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler