Check for 0 themen
This commit is contained in:
@@ -2,8 +2,12 @@ class HomeController < ApplicationController
|
|||||||
def index
|
def index
|
||||||
@beispiele = Beispiel.last([Beispiel.count, 3].min)
|
@beispiele = Beispiel.last([Beispiel.count, 3].min)
|
||||||
@neuigkeiten = Neuigkeit.recent
|
@neuigkeiten = Neuigkeit.recent
|
||||||
|
if Thema.count>0
|
||||||
t=YAML.load_file("#{::Rails.root.to_s}/config/start_topic.yml")
|
t=YAML.load_file("#{::Rails.root.to_s}/config/start_topic.yml")
|
||||||
@starttopic= @themen = Thema.where(:id=>t).first
|
@starttopic= @themen = Thema.where(:id=>t).first
|
||||||
|
else
|
||||||
|
@starttopic=@themen = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
def dev
|
def dev
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user