attributes would likely screw up ActiveRecord though, that was silly of me. Perhaps another name like "virtual_attributes" would be better.
On Sep 11, 5:22 pm, Gavin <[email protected]> wrote: > 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 > > On Sep 11, 11:34 am, RVince <[email protected]> wrote: > > > > > 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

