materialize-form 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04aa9d3aa213ff76a667e22ec2df527502cc62a9
4
- data.tar.gz: 437c3126951be4119c54c283486c29e4f1960bb4
3
+ metadata.gz: ff41bfaf90ade81fd6366f8053ca6f9dfcfcb3dd
4
+ data.tar.gz: 0714676ac3ea05c844d99c1ec0d316e3ead84b24
5
5
  SHA512:
6
- metadata.gz: 483497363201f7838cb21502491e4a7ff29ee69e82aae64b9c6f8cbb5f1f1370193792c7e7e4621bc8cb3ccb2c7fb505ec1e488c8ada48a0f6c8646ca2e8ba8f
7
- data.tar.gz: a7366ca8a323b25a634de4082634d0ee6b63af0b177acebabd54af330013a381133043b3d00e1ea12be9a5f072dc04b21d51072beb58647b185d2507551b0c10
6
+ metadata.gz: 5d9e58f1457b5b49617802401c68dbafd58be14007f9798c40c98c2be26d2d79d856ddd98befeb442ea44289feb8434c3ed76995acb74ffb48a803c4f4cfe095
7
+ data.tar.gz: 3b945f96a2cb8ffa01d494344a1f2a97d81a13a5d21a3187aa8abb837ba993b2d12b9835e5c9783ecda859628bbe7f3927983d4b011da39a3da7fd1ab8c86136
data/README.md CHANGED
@@ -37,7 +37,7 @@ Import Materialize styles in app/assets/stylesheets/application.scss:
37
37
  $ rm app/assets/stylesheets/application.css
38
38
  ```
39
39
 
40
- ## Installation
40
+ ## Installation
41
41
 
42
42
  ### Step 1:
43
43
  Add this line to your application's Gemfile:
@@ -65,7 +65,7 @@ Import Materialize Form javascript in `app/assets/javascripts/application.js`:
65
65
  To start using Materialize Form you just have to use the helper it provides:
66
66
 
67
67
  ```slim
68
- = simple_form_for @user do |f|
68
+ = simple_form_for @user do |f|
69
69
  .row
70
70
  = f.input :first_name, wrapper_html: { class: 'm6 s12' }
71
71
  = f.input :last_name, wrapper_html: { class: 'm6 s12' }
@@ -130,9 +130,19 @@ $(document).on('nested:fieldAdded', function(event){
130
130
  })
131
131
  ```
132
132
 
133
+ ## Working with [Turbolinks](https://github.com/turbolinks/turbolinks)
134
+
135
+ In `app/assets/javascripts/application.js`:
136
+
137
+ ```
138
+ $(document).on('turbolinks:load', function() {
139
+ window.materializeForm.init()
140
+ })
141
+ ```
142
+
133
143
  # Example:
134
144
  ```slim
135
- = simple_nested_form_for @category do |category_form|
145
+ = simple_nested_form_for @category do |category_form|
136
146
  .row
137
147
  = category_form.input :title, wrapper_html: { class: 'm6 s12' }
138
148
  = category_form.input :picture, wrapper_html: { class: 'm6 s12' }
@@ -19,7 +19,7 @@ window.materializeForm = {
19
19
  }
20
20
  }
21
21
 
22
- $(document).on('turbolinks:load', function() {
22
+ $(document).ready(function() {
23
23
  window.materializeForm.init()
24
24
  });
25
25
 
@@ -1,5 +1,5 @@
1
1
  module Materialize
2
2
  module Form
3
- VERSION = "1.0.7"
3
+ VERSION = "1.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: materialize-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James La