RE: Maintaining DB reflection without scaffolding

removed_email_address@domain.invalid wrote:

I would like to know if there is a way to maintain database
reflection for the ‘new’ and ‘edit’ views whilst removing

Check out what Scaffolding does, it’s something like:

Model.columns.each do |c|

print field…



I forgot to mention that the db reflection also goes away when the
scaffolding is generated to disk. So the only way to have db reflection
that I’ve found so far is via “dynamic” scaffolding like the following
in the controller:

scaffold :foobar

I haven’t been able to find anything like your psuedo-code above in the
generated scaffolding or the API docs. Where do you say it should


Matt C. Wagner
Information Security Analyst

Network Intrusion Detection
Security Operations Center
Corporate Information Security
Wells Fargo Bank

This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you received this message
in error, please advise the sender immediately by reply e-mail and
delete this message. Thank you for your cooperation.

On 30/12/2005, at 11:30 AM, removed_email_address@domain.invalid wrote:

generated scaffolding or the API docs. Where do you say it should

Yes, the forms are statically generated, but the table listing isn’t.
Generate scaffolding to disk and look in the table view. The code you
want will be something like:

<% for column in Model.content_columns %>

<%= column.human_name %>:

<% end %>

Phillip H.