optimism 0.4.0 → 0.4.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
2
  SHA256:
3
- metadata.gz: cea48e2dd50fa40be2694720407b8f39d38dc4923eb417d98b99a2f4c7260a53
4
- data.tar.gz: 8ff0f3651eda96026413b22296f1c98beaedb5bf1148a66ab60b7ba1c90a3645
3
+ metadata.gz: 5880f22ff564228a65bbc9c7b9954a5ce996174266ed8567b6c28fd5da729062
4
+ data.tar.gz: 2f1dd15c17eadd3b6b577d7c9bad6ad4a195b71da629bbe0f8a4ebdbe29c5dfd
5
5
  SHA512:
6
- metadata.gz: 0d3ee3375b300564884967856f89da6e1a8739d5a9d891f7e714746a4168eea707e16f0819a5a47ce4d5d3771001ebd8a940a11f6ec782a699aba2b710d01dd2
7
- data.tar.gz: 8b6443e2a38150dfe80466a02c58360033aee50f95f661f48046c410e16f8fa07c4e6f6025954ed7778782582c0f1e5f9c53dcc17c6987cc70f3d77b4ef60209
6
+ metadata.gz: 84bae96ece4aa0caaa75989b04b7edf1dd4efd6f2179f705da107c6917f0c9bd408ad8aacbb3fd47ed9796a3e6844d5fdee1f14f2b63723d2608da1b31e5304a
7
+ data.tar.gz: 8a30edd135765c3b5d5224fe8b030a0123f8e819ef2ddf0be11bf98e662827a5123c13ee54951932a0859858d9c6acd8c7df359421c1b91bc25c4fd6a3815598
data/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  The missing drop-in solution for realtime remote form validation in Rails.
6
6
 
7
+ {% hint style="success" %}
8
+ Optimism v0.4.1 now supports Ruby 3.0.0, thanks to [Julian Rubisch](https://twitter.com/julian_rubisch) and Rails 6.1, thanks to [Josh LeBlanc](https://github.com/joshleblanc). 🎉
9
+ {% endhint %}
10
+
7
11
  ## Why have optimism?
8
12
 
9
13
  [Optimism](https://github.com/leastbad/optimism) is an MIT-licensed [Ruby on Rails](https://rubyonrails.org/) gem that makes it easy to give your users instant constructive feedback if they enter invalid data into your application. Instead of dumping a list of errors at the top of your interface, Optimism provides specific instructions directly beside or below individual input elements.
@@ -92,7 +92,7 @@ end
92
92
  module ActionView::Helpers
93
93
  module FormHelper
94
94
  def error_for(object_name, attribute, **options)
95
- tag.span options.merge! id: error_id_for(object_name, attribute)
95
+ tag.span **options.merge(id: error_id_for(object_name, attribute))
96
96
  end
97
97
 
98
98
  def error_id_for(object_name, attribute)
@@ -102,7 +102,7 @@ module ActionView::Helpers
102
102
 
103
103
  class FormBuilder
104
104
  def container_for(attribute, **options, &block)
105
- @template.tag.div @template.capture(&block), options.merge!(id: container_id_for(attribute)) if block_given?
105
+ @template.tag.div @template.capture(&block), **options.merge(id: container_id_for(attribute)) if block_given?
106
106
  end
107
107
 
108
108
  def container_id_for(attribute)
@@ -110,7 +110,7 @@ module ActionView::Helpers
110
110
  end
111
111
 
112
112
  def error_for(attribute, **options)
113
- @template.error_for(object_name, attribute, options)
113
+ @template.error_for(object_name, attribute, **options)
114
114
  end
115
115
  end
116
116
  end
@@ -1,3 +1,3 @@
1
1
  module Optimism
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - leastbad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-19 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler