Skip to content

Instantly share code, notes, and snippets.

" 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.
# 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