# HG changeset patch # User luisf # Date 1290524227 0 # Node ID 158a59127bbecc8d657c5b207834e049827492ba # Parent 8032b626953b7c279bcab900455b821f10a3ebbd The tip of the day only appears to logged in users. diff -r 8032b626953b -r 158a59127bbe app/controllers/welcome_controller.rb --- a/app/controllers/welcome_controller.rb Tue Nov 23 13:41:39 2010 +0000 +++ b/app/controllers/welcome_controller.rb Tue Nov 23 14:57:07 2010 +0000 @@ -21,6 +21,14 @@ def index @news = News.latest User.current @projects = Project.latest User.current + + # tests if user is logged in to gfenerate the tips of the day list + if User.current.logged? + @tipsoftheday = Setting.tipoftheday_text + else + @tipsoftheday = '' + end + end def robots diff -r 8032b626953b -r 158a59127bbe app/views/welcome/index.rhtml --- a/app/views/welcome/index.rhtml Tue Nov 23 13:41:39 2010 +0000 +++ b/app/views/welcome/index.rhtml Tue Nov 23 14:57:07 2010 +0000 @@ -9,12 +9,13 @@