Refactor registration_dates_given?
This commit is contained in:
parent
7638b33926
commit
bc966259fb
1 changed files with 3 additions and 5 deletions
|
|
@ -155,11 +155,9 @@ class Conference < ActiveRecord::Base
|
||||||
# * +false+ -> If the conference registration dates are not set
|
# * +false+ -> If the conference registration dates are not set
|
||||||
# * +true+ -> If conference registration dates are set
|
# * +true+ -> If conference registration dates are set
|
||||||
def registration_dates_given?
|
def registration_dates_given?
|
||||||
if registration_period.nil? || (registration_period.start_date.blank? || registration_period.end_date.blank?)
|
registration_period.present? &&
|
||||||
false
|
registration_period.start_date.present? &&
|
||||||
else
|
registration_period.end_date.present?
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue