Last active
June 25, 2017 11:31
-
-
Save mariorcardoso/5e7ca60b77ebc638189d60010ddc0443 to your computer and use it in GitHub Desktop.
This file contains 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
class Event < ActiveRecord::Base | |
def date_range | |
DateRange.new(start_date, end_date) | |
end | |
def date_range=(date_range) | |
self.start_date = date_range.start_date | |
self.end_date = date_range.end_date | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment