Formtastic 2.0

Published 26 September 11 by Justin French

Formtastic 2.0 finally shipped over the weekend.

It’s been an epic, epic ride with contributions from 43 awesome coders. Many many thanks to Aditya Sanghi, Balazs Nagy, beawesomeinstead, Bruce Williams, Chad Ostrowski, Christoph Thiel, Corin Langosch, Corin Langosch, Daiki Ueno, DeLynn Berry, Edgars Beigarts, eugen neagoe, Gabriel Sobrinho, Ijonas Kisselbach, iscra, Jakub Okoński, Jan Schwenzien, Jason King, Joe Winter, Josh Kalderimis, Juan M. Cuello, Justin French, Kent Fenwick, Kjel Delaey, Kjel Delaey, Konstantin Shabanov, Kouhei Sutou, Lars O. Overskeid, Matt Huggins, Matt Vague, Mattias Pfeiffer, Mikael Henriksson, nashby, Nathan S, Petteri Räty, Pirogov Evgenij, Robin Stocker, Ryan Garver, smix, Thomas Walpole, Timothy Klim, Victor Stan and Wojciech Wnętrzak.

The changelog has the full details blow-by-blow, but for those with a short attention span, here’s the big tickets:

  • Dropped Rails 2 support
  • Added Rails 3.1 support, including the asset pipeline
  • Massive internal refactor, allowing for much simpler custom inputs
  • Added many new classes to DOM elements to enable more efficient and descriptive CSS
  • Massive refactor and simplification of the stylesheets
  • Massive documentation effort
  • Added support for HTML5 required, min, max, step, placeholder and autofocus attributes
  • Improved support for Mongoid and MongoMapper documents
  • Changed nested inputs() blocks to be automatically wrapped in an <li> tag to preserve HTML validity
  • Changed quick forms to skip polymorphic associations (they didn’t work)
  • Changed short hand forms to raise an error when trying to render an input for a polymorphic association (it didn’t work, need a collection)
  • Changed input() to raise an error when a :collection is not provided for a polymorphic association (we can’t guess which class to use)
  • Changed :label_method option to :member_label, :value_method option to :member_value, :grouped_label_method to :grouped_label (with backwards compat and deprecation warnings)

Enjoy!

Options

What is this?

portrait of Justin

This is the online home of Justin French, a designer & web application developer located in Melbourne, Australia. I like finding ways to make things work better. I like clarifying and simplifying. I like to understand how you understand things.

» read more

Subscribe to my feed

Follow me on Twitter

@justinfrench

More Notebook Articles

Show more notebook articles

Search