Module: BlogBasic::SharedHelper
- Defined in:
- app/helpers/blog_basic/shared_helper.rb
Instance Method Summary collapse
- #leaderboard_ad ⇒ Object
- #require_user ⇒ Object
- #sidebar_ad(posted_at) ⇒ Object
- #title(page_title) ⇒ Object
Instance Method Details
#leaderboard_ad ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/helpers/blog_basic/shared_helper.rb', line 18 def leaderboard_ad if !danish? raw render(:partial => '/snippets/h_leaderboard_ad') else raw render :text => "<div></div>" end end |
#require_user ⇒ Object
4 5 6 |
# File 'app/helpers/blog_basic/shared_helper.rb', line 4 def require_user session[:user_id] end |
#sidebar_ad(posted_at) ⇒ Object
12 13 14 15 16 |
# File 'app/helpers/blog_basic/shared_helper.rb', line 12 def (posted_at) if (posted_at < 30.days.ago) && !danish? raw render(:partial => '/snippets/v_text_ad') end end |
#title(page_title) ⇒ Object
8 9 10 |
# File 'app/helpers/blog_basic/shared_helper.rb', line 8 def title(page_title) content_for(:title, page_title) end |