Skip to content

Instantly share code, notes, and snippets.

@latompa
Created April 27, 2011 17:59
Show Gist options
  • Save latompa/944798 to your computer and use it in GitHub Desktop.
Save latompa/944798 to your computer and use it in GitHub Desktop.
poly.rb
class Reservation
has_one :authorization, :as => :authorizable
has_one :capture, :as => :capturable
end
class CreditCardAuthorization
belongs_to :authorizable, :polymorphic => true
def capture
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment