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
Post a Comment