Scaffold (form) for single record

I am looking for a sort of scaffolding (because the schema of the
individual table whose individual record I do not know until runtime)
for putting into a div to be displayed in say, redbox. Does anyone
have anything along the lines for that they might recommend? Thanks,
RVince

Hey RVince

Creating tables at runtime sounds really messy - have you considered
other options?

For example, using serialize in your models and storing attributes as
a hash:

class Product

serialize :attributes

end

@product = Product.new :name => “Canon Ixus”, :category =>
“Camera”, :attributes => { :price => $150, :battery_life => “8
hours”, … etc… }

Maybe this ‘virtual class’ approach isn’t best for your app but
perhaps there are other, similar approaches?

Gavin

attributes would likely screw up ActiveRecord though, that was silly
of me. Perhaps another name like “virtual_attributes” would be better.