Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calc_arrival_date
- if ada
- ada #return actual date of arrival
- elsif updated_eda
- updated_eda #return updated estimated date of arrival
- else
- eda #return estimated date of arrival
- end
- end
- scope :archived, -> { joins(:voyage_legs).where("voyage_legs.calc_arrival_date < ?", Time.zone.now) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement