gravityblast / web-app-theme

A simple theme for web apps
Other
2.45k stars 387 forks source link

Mongoid ODM doesn't properly output data types as form fields #19

Open mrrooijen opened 13 years ago

mrrooijen commented 13 years ago

In Mongoid when you define for example something like this:

class User
  include Mongoid::Document
  field :firstname, :type => String
  field :lastname, :type => String
  field :admin, :type => Boolean
  field :birthdate, :type => Date
end

It just creates text_field's for all input types, rather than a date select or checkbox for boolean.

https://github.com/pilu/web-app-theme/blob/master/lib/generators/web_app_theme/themed/templates/view_form.html.erb

dryaf commented 12 years ago

use formtastic, probably its compatible