The default scaffold generator generates the following code for a
boolean field. This results in a past selection not being remembered
I guess it should be:
<%= select(“model”, “active”, [[‘True’, true],[‘False’, false]]) %>
This seems to be a rather basic operation for the scaffolding
generator to get wrong. Am I missing something?
FYI: I am using Rails 1.2.5 (through InstantRails + update).
Yes, it’s basic. Because scaffolding is basic. It’s also not meant for
Second, people like the scaffolding because it builds forms for them
I just released a gem called scaffold_form_generator that does the form
generation part of scaffolding (no controller, no model, just the form).
It’s really meant for use in Rails 2.0 apps though since it uses RESTful
routing and the new .html.erb syntax for forms.
You can learn more about that at http://scaffoldform.rubyforge.org
I prefer checkboxes for booleans… it’s quicker and just makes more
from a usability standpoint.
<%=check_box :model, :active %>
When you generate a form with scaffold_form_generator, that’s what you
If you’re looking for something more advanced than scaffolding, look at
ActiveScaffold or Streamlined, two very nice projects that take
to a whole new level, one that could be used in production (though I
think you should code your own user interfaces, but I’m an HTML guy at