lib/generators/koudoku/templates/app/models/subscription.rb in koudoku-1.2.4 vs lib/generators/koudoku/templates/app/models/subscription.rb in koudoku-2.0.0
- old
+ new
@@ -1,8 +1,8 @@
class Subscription < ActiveRecord::Base
include Koudoku::Subscription
<%= "attr_accessible :credit_card_token" if Rails::VERSION::MAJOR == 3 %>
belongs_to :<%= subscription_owner_model %>
- belongs_to :coupon
+ belongs_to :coupon, optional: true
end