On Monday, December 14, 2015 at 1:43:08 AM UTC, Oto Iashvili wrote:
> Hi,
> Does someone know rails polymorphic very well and can explain me how I can do 
> something similar than polymorphic and change dynamically the table name for 
> a polymorphic attribute.
> I know already that normally you need a have a "_type" attribute to define 
> the table name, but I would like to define my own way to retrieve to table 
> name. I was trying with table_name="xxx" but it doesn't works
> 
> 

The foo_type column references a class name, not a table name. I am not aware 
of any alternative mechanism for controlling by how polymorphic associations 
are loaded (perhaps a concrete example might clarify things)

Fred

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/1167a75e-d466-45bb-bd78-ca4b086c092b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to