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 +4 -4
- data/lib/optimism.rb +1 -1
- data/lib/optimism/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a935699b3be00235a60d3b448b7775e08030da7abe09670355aec835af702c5
|
4
|
+
data.tar.gz: 50e405ae5b908b30f60142b5221db85e605f56ae82d031df36a9883b7f6bd922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4776e29d1d7130b60d4329f5355e56d18493e3c247fa38c0ec07ceaeece56b1a7d97e53dd8f46241eb55a1b27b1a8166d73cde19187276b2bec97f5cafab7023
|
7
|
+
data.tar.gz: b0ae31af7e811160209be5af0a7c88c459abd6f8302201fe9fc52fff0fd39ad3702286ea533b216bb65053030eb0ea6c56b3dd757e6ab70d2498216bc1ae0007
|
data/lib/optimism.rb
CHANGED
@@ -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.
|
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
|
data/lib/optimism/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|