optimism 0.3.4 → 0.3.5

This diff has not been reviewed by any users.
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: 1a12a0053965b28a8258bfe5d29fc98f70f2cac17750cfa8f5c592dd5461f314
4
- data.tar.gz: 28c699c076d379d9b205a1ba653997a61db999f220759d005c849954ce76e0ec
3
+ metadata.gz: 4243758152d4a7299eecfe0104b01187a272be5f1da3873b618441b532289f01
4
+ data.tar.gz: fcdf8b15dacfa3e211e0f3ffd2bba7ba0dd9f095a93152315795bba37430e896
5
5
  SHA512:
6
- metadata.gz: 74dffb38414c002334f9aa58d291531b77914a050ada8accff7225861f7bc16effdf785dd8df3776a05202a82d0182ab2fc4056ff4616078f3780ef4e85e10de
7
- data.tar.gz: a3a40b20bd5087fdfba1803a976e0dc3857e05f99f8f41bc6e91ceb4158942623558855e91e0693ff985453cbb355c61196adbe34a758c72c9a24c4280ee6dc2
6
+ metadata.gz: 0ae487f731194a11c364aea1fc5baefbdef1496dc536c5d3723be3d304d73a4fab36d6179ff2b86ddc5949a39129fe1a1edb284742ae88d7f68c7b99f78f1398
7
+ data.tar.gz: ae7cb3a35fcbe92e3a03ce5698c7dc0e8029b2bbd80ec038762066295803f64692196a04505b5ce5851ed012734e48f56b5685ed79dc537fa535423213a40733
@@ -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.class.to_s.underscore
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
@@ -1,3 +1,3 @@
1
1
  module Optimism
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
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.3.4
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-06-25 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler