But if you *have* to have it as a Product for some reason, you can use
the ActiveRecord::Base "becomes" method:
ActiveRecord::Base
It's a Membership indeed, but in the admin section of my app, I don't
need to recode a specific controller for memberships, they can use the
products_controller which is fine and defining :controller => "products"
won't do the trick as some actions cannot be shared.
#becomes is exactly what I was looking for, I didn't know about this
method and it's not featured in AWDWR 3rd Ed.
It's a Membership indeed, but in the admin section of my app, I don't
need to recode a specific controller for memberships, they can use the
products_controller which is fine and defining :controller => "products"
won't do the trick as some actions cannot be shared.
Makes sense.
#becomes is exactly what I was looking for, I didn't know about this
method and it's not featured in AWDWR 3rd Ed.
Kewl. Glad to help.
AWDWR is a good book - but it's not all-encompassing... You need to
get familiar with navigating the Ruby and Rails API documentation to
find the rest of the cool stuff