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
<ga...-YMj/zd8x6QpKMzDMP321V2ksYUyLi9NM@public.gmane.org>
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
<rvinc...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 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