Railties

To edit the scaffold templates, look up the location of the railties gem with “gem info railties”

Within the location above, edit the templates in the subdirectories:

To generate dropdowns for referenced attributes, use the following code:

<%- if attribute.reference? -%>
  <%%= f.label :<%= attribute.column_name %> %><br>
  <%%= f.collection_select :<%= attribute.column_name %>, <%= attribute.name.camelize %>.all, :id, :name, prompt: true  %>
<%- else -%>