Solved Issue 1259
This commit is contained in:
parent
42741fa90b
commit
529b8eb710
4 changed files with 21 additions and 3 deletions
10
lib/root_route_constraint.rb
Normal file
10
lib/root_route_constraint.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class RootRouteConstraint
|
||||
def initialize
|
||||
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
|
||||
end
|
||||
|
||||
def matches?(*)
|
||||
return unless @current.present? && @current.first.splashpage.present?
|
||||
@current.count == 1 && @current.first.splashpage.public?
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue