Module: BlogBasic::SharedHelper

Defined in:
app/helpers/blog_basic/shared_helper.rb

Instance Method Summary collapse

Instance Method Details

#leaderboard_adObject



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_userObject



4
5
6
# File 'app/helpers/blog_basic/shared_helper.rb', line 4

def require_user
  session[:user_id]
end


12
13
14
15
16
# File 'app/helpers/blog_basic/shared_helper.rb', line 12

def sidebar_ad(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