Rails ActiveModel: inheritance namespace -


i have parent class

class project::subscription < activerecord::base 

and 2 inherited classes

class project::loan::subscription < project::subscription class project::investment::subscription < project::subscription 

when call project::loan::subscription.first, shows:

  project::loan::subscription load (0.4ms)  select  "project_subscriptions".* "project_subscriptions" "project_subscriptions"."type" in ('project::loan::subscription')  order "project_subscriptions"."id" asc limit  

which correct.

but when call project::investment::subscription.first, shows:

project::subscription load (0.3ms)  select  "project_subscriptions".* "project_subscriptions"  order "project_subscriptions"."id" asc limit 1 

in last call, project::investment::subscription acting project::subscription

what's wrong code?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -