I have been using Django for about a year and I think I’ll try Ruby on Rails to see how it compares. In Django, you can create a ModelForm that automatically generates html for the type-based fields in your model. Is there a class that does something similar in Rails? I know scaffolding will create an erb file for my model, but is there any way to do this?
<%= auto_form_for @person %>
Or that?
<%= form_for @person do |f| %>
<% for each @person.fields do | field| %>
<%= auto_field f, field %>
<%end%>
<% end %>
Sorry for my bad ruby code.
source
share