Class: PaymillOnRails::SubscriptionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PaymillOnRails::SubscriptionsController
- Defined in:
- app/controllers/paymill_on_rails/subscriptions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/paymill_on_rails/subscriptions_controller.rb', line 15 def create @subscription = Subscription.new( subscription_params ) if @subscription.save_with_payment redirect_to @subscription, :notice => "Thank you for subscribing!" else render :new end end |
#new ⇒ Object
10 11 12 13 |
# File 'app/controllers/paymill_on_rails/subscriptions_controller.rb', line 10 def new plan = Plan.find(params[:plan_id]) @subscription = plan.subscriptions.build end |
#show ⇒ Object
7 8 |
# File 'app/controllers/paymill_on_rails/subscriptions_controller.rb', line 7 def show end |