hzamani / acts_as_relation

Multi table Inheritance for rails
http://hzamani.github.com/acts_as_relation/
MIT License
180 stars 58 forks source link

Name of the has_one assiocation #61

Closed tomraulet closed 10 years ago

tomraulet commented 10 years ago

Hi,

I use the ransack gem https://github.com/activerecord-hackery/ransack and i wnat to build a form with condition fields like describe in R. bates railscasts : http://railscasts.com/episodes/370-ransack

I start my form with my superclass model. I try to associate child classes but calling :

Superclass.first.childclass

says "NoMethodError"

Any ideas ?

Thanks in advance,

best regards

mfoste commented 10 years ago

Use Superclass.first.specific instead of Superclass.first.childclass?

On Mon, Apr 28, 2014 at 9:44 AM, foxpowa notifications@github.com wrote:

I use the ransack gem https://github.com/activerecord-hackery/ransack and i wnat to build a form with condition fields like describe in R. bates railscasts : http://railscasts.com/episodes/370-ransack

I start my form with my superclass model. I try to associate child classes but calling :

Superclass.first.childclass

says "NoMethodError"

Any ideas ?

— Reply to this email directly or view it on GitHubhttps://github.com/hzamani/acts_as_relation/issues/61 .