Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple form DSL with dynamic interactions for Rails

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE Cleans Gem June 24, 2012
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile Cleans Gem June 24, 2012
Octocat-spinner-32 VERSION Puts files at their right places February 04, 2014
Octocat-spinner-32 formize.gemspec
README.rdoc

Formize

Gem Version

Form helpers. Will be integrated with SimpleForm.

Installation

Add to your Gemfile these fllowing lines:

gem "jquery-rails" # Need to be explicitly specified
gem "formize"

Assets and configurations

Formize comes with basic scripts and stylesheets which must be included in the layout (at least at the start).

In Rails 3.0.x

Formize requires the gem jquery-rails, so if you don't already use it:

rails generate jquery:install --ui

Then install formize in your app like jquery-rails:

rails generate formize:install

These previous commands install all the needed files in your public/ directory. Then the files can be included with an helper:

# app/views/layouts/application.html.erb
<%= formize_include_tag -%>

In Rails ≥ 3.1

With the asset pipeline, there is no need to run generators or copy files. So for stylesheets:

# app/assets/stylesheets/application.css
*= require formize

And for javascripts:

# app/assets/javascripts/application.js
*= require formize

Default configuration file

To install the default configuration file (config/initializers/formize.rb), the generator must be run:

rails generate formize:install

Usage

TODO: Rewrite examples

Date

Datetime

Unroll (replacement of ComboBox)

MonoChoice (dynamic selector)

Contributing to Formize

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright © 2011 Brice Texier. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.