README.md in materialize-form-1.0.7 vs README.md in materialize-form-1.0.8

- old
+ new

@@ -35,11 +35,11 @@ ``` $ rm app/assets/stylesheets/application.css ``` -## Installation +## Installation ### Step 1: Add this line to your application's Gemfile: ``` gem 'materialize-form' @@ -63,11 +63,11 @@ ### Assume you are using SLIM To start using Materialize Form you just have to use the helper it provides: ```slim -= simple_form_for @user do |f| += simple_form_for @user do |f| .row = f.input :first_name, wrapper_html: { class: 'm6 s12' } = f.input :last_name, wrapper_html: { class: 'm6 s12' } = f.button :submit @@ -128,12 +128,22 @@ $(document).on('nested:fieldAdded', function(event){ window.materializeForm.init() }) ``` +## Working with [Turbolinks](https://github.com/turbolinks/turbolinks) + +In `app/assets/javascripts/application.js`: + +``` +$(document).on('turbolinks:load', function() { + window.materializeForm.init() +}) +``` + # Example: ```slim -= simple_nested_form_for @category do |category_form| += simple_nested_form_for @category do |category_form| .row = category_form.input :title, wrapper_html: { class: 'm6 s12' } = category_form.input :picture, wrapper_html: { class: 'm6 s12' } #articles.row