Skip to content

Dirty Forms, A jQuery Plugin save you leaving filled forms in gems

License

Notifications You must be signed in to change notification settings

Rakefire/jquery-dirtyforms-rails

 
 

Repository files navigation

jQuery-DirtyForms-Rails Gem Version

Installation

Add this line to your application's Gemfile:

gem 'jquery-dirtyforms-rails'

And then execute:

$ bundle

Usage

app/assets/javascripts/application.js

//= require jquery.dirtyforms
//= require jquery.dirtyforms.dialogs.bootstrap

$(document).ready(function() {
  $("form.sodirty").dirtyForms();
});

At any erb/slim/haml view

<%= form_for :person, html: { class: "sodirty" } do |f| %>
  First name: <%= f.text_field :first_name %><br />
  Last name : <%= f.text_field :last_name %><br />
  Biography : <%= f.text_area :biography %><br />
  Admin?    : <%= f.check_box :admin %><br />
  <%= f.submit %>
<% end %>

More detail

See official readme

About

Dirty Forms, A jQuery Plugin save you leaving filled forms in gems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%