Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Introducing Price
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVartanov committed Jan 14, 2012
1 parent 6b24ded commit 12a5cbf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/price.rb
@@ -0,0 +1,8 @@
class Price < ActiveRecord::Base
belongs_to :from, :class_name => "Zone"
belongs_to :to, :class_name => "Zone"

def self.between(from, to)
where(:from_id => from.id, :to_id => to.id).first
end
end

0 comments on commit 12a5cbf

Please sign in to comment.