undo deletion of function, so that api works (/api/v1/conferences/)
This commit is contained in:
parent
244ea9d34a
commit
fb607050fe
1 changed files with 18 additions and 0 deletions
|
|
@ -113,6 +113,24 @@ class Conference < ActiveRecord::Base
|
||||||
before_create :create_email_settings
|
before_create :create_email_settings
|
||||||
before_create :add_color
|
before_create :add_color
|
||||||
|
|
||||||
|
def date_range_string
|
||||||
|
startstr = "Unknown - "
|
||||||
|
endstr = "Unknown"
|
||||||
|
if start_date.month == end_date.month && start_date.year == end_date.year
|
||||||
|
startstr = start_date.strftime("%B %d - ")
|
||||||
|
endstr = end_date.strftime("%d, %Y")
|
||||||
|
elsif start_date.month != end_date.month && start_date.year == end_date.year
|
||||||
|
startstr = start_date.strftime("%B %d - ")
|
||||||
|
endstr = end_date.strftime("%B %d, %Y")
|
||||||
|
else
|
||||||
|
startstr = start_date.strftime("%B %d, %Y - ")
|
||||||
|
endstr = end_date.strftime("%B %d, %Y")
|
||||||
|
end
|
||||||
|
|
||||||
|
result = startstr + endstr
|
||||||
|
result
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Checks if the user is registered to the conference
|
# Checks if the user is registered to the conference
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue