lib/generators/koudoku/install_generator.rb in koudoku-0.0.8 vs lib/generators/koudoku/install_generator.rb in koudoku-0.0.9
- old
+ new
@@ -40,10 +40,10 @@
# Generate subscription.
generate("model", "subscription stripe_id:string plan_id:integer last_four:string coupon_id:integer last_four:string card_type:string current_price:float #{subscription_owner_model}_id:integer")
gsub_file "app/models/subscription.rb", /ActiveRecord::Base/, "ActiveRecord::Base\n include Koudoku::Subscription\n\n belongs_to :#{subscription_owner_model}\n belongs_to :coupon\n"
# Add the plans.
- generate("model", "plan name:string stripe_id:string price:float features:text highlight:boolean display_order:integer")
+ generate("model", "plan name:string stripe_id:string price:float interval:string features:text highlight:boolean display_order:integer")
gsub_file "app/models/plan.rb", /ActiveRecord::Base/, "ActiveRecord::Base\n include Koudoku::Plan\n belongs_to :#{subscription_owner_model}\n belongs_to :coupon\n has_many :subscriptions\n"
# Add coupons.
generate("model coupon code:string free_trial_length:string")
gsub_file "app/models/plan.rb", /ActiveRecord::Base/, "ActiveRecord::Base\n has_many :subscriptions\n"
\ No newline at end of file