This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Example Vim configuration. | |
| " Copy or symlink to ~/.vimrc or ~/_vimrc. | |
| let &titleold=getcwd() | |
| set notitle | |
| set nocompatible " Must come first because it changes other options. | |
| silent! call pathogen#runtime_append_all_bundles() | |
| syntax enable " Turn on syntax highlighting. | |
| filetype plugin indent on " Turn on file type detection. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In customer model, gets the latest subscription info from spreedly | |
| def update_from_spreedly | |
| subscriber_info = Spreedly::Subscriber.find(self.id) | |
| cs = self.customer_subscriptions.current.last | |
| # Check to see if this is an update to an existing customer_subscription | |
| if cs && cs.transaction_id == subscriber_info.token | |
| cs.subscription = Subscription.find_by_level(subscriber_info.feature_level) if !subscriber_info.feature_level.blank? | |
| cs.active = subscriber_info.active |