У меня ошибка лица в ROR версии 2, NoMethodError (неопределенный метод `new_payment_model 'для nil: NilClass), вот мой код
class Authorization < ActiveRecord::Base
belongs_to :franchisee
belongs_to :deleted_by, :class_name => 'User', :foreign_key => :deleted_by
belongs_to :created_by, :class_name => 'User', :foreign_key => :created_by
has_many :transactions
validates_presence_of :notify_email
validates_presence_of :activation_price, :expires_on
validates_length_of :notify_email, :maximum => 255
validates_format_of :notify_email, :with => EMAIL_REGEX
validates_numericality_of :activation_price, :greater_than => 0.0, :unless => Proc.new {|a| a.franchisee.new_payment_model}
end