Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Users::RegistrationsController < Devise::RegistrationsController
- def create
- build_resource
- if resource.save
- set_flash_message :notice, :signed_up
- sign_in(resource_name, resource)
- # "paypal" payment provider and "pro" subscription
- # :user_id is passed back to you in the on_success and on_cancellation callbacks
- # redirects user to paypal
- # this could be easily changed to accept params so you could have user choose which payment provider
- # and which subscription level
- cinchy_subscribe!("paypal", "pro", :user_id => resource.id)
- else
- clean_up_passwords(resource)
- render_with_scope :new
- end
- end
- end
Add Comment
Please, Sign In to add comment