optimism 0.3.4 → 0.3.5
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: 4243758152d4a7299eecfe0104b01187a272be5f1da3873b618441b532289f01
|
4
|
+
data.tar.gz: fcdf8b15dacfa3e211e0f3ffd2bba7ba0dd9f095a93152315795bba37430e896
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ae487f731194a11c364aea1fc5baefbdef1496dc536c5d3723be3d304d73a4fab36d6179ff2b86ddc5949a39129fe1a1edb284742ae88d7f68c7b99f78f1398
|
7
|
+
data.tar.gz: ae7cb3a35fcbe92e3a03ce5698c7dc0e8029b2bbd80ec038762066295803f64692196a04505b5ce5851ed012734e48f56b5685ed79dc537fa535423213a40733
|
data/lib/optimism.rb
CHANGED
@@ -26,7 +26,7 @@ module Optimism
|
|
26
26
|
|
27
27
|
def broadcast_errors(model, attributes)
|
28
28
|
return unless model&.errors&.messages
|
29
|
-
resource = model
|
29
|
+
resource = ActiveModel::Naming.param_key(model)
|
30
30
|
form_selector, submit_selector = Optimism.form_selector.sub("RESOURCE", resource), Optimism.submit_selector.sub("RESOURCE", resource)
|
31
31
|
attributes = case attributes
|
32
32
|
when ActionController::Parameters, Hash, ActiveSupport::HashWithIndifferentAccess
|
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.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leastbad
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|