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 +4 -4
- data/README.md +13 -3
- data/app/assets/javascripts/materialize-form.js +1 -1
- data/lib/materialize/form/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff41bfaf90ade81fd6366f8053ca6f9dfcfcb3dd
|
4
|
+
data.tar.gz: 0714676ac3ea05c844d99c1ec0d316e3ead84b24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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' }
|