currently I do some work with polymorphic associations in egde rails
class Order < ActiveRecord::Base
belongs_to :payment, :polymorphic => true
class CreditCardPayment < Payment
class PayPalPayment < Payment
class Payment < ActiveRecord::Base
has_one :order, :as => :payment
common stuff in here
I want to use [Payment] for common functionality typical to payments.
However, this will throw an error:
ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table
doesn’t exist: SHOW FIELDS FROM payments
Is there a way to convince ActiveRecord that [Payment] is an abstract
class that does not need to exist (and take the name of the concrete
for determining the table name) ?
Thanks in advance!!