Module: BlogHelper

Defined in:
app/helpers/blog_helper.rb

Instance Method Summary collapse

Instance Method Details



17
18
19
# File 'app/helpers/blog_helper.rb', line 17

def spud_blog_rss_link
	return tag :link, :rel => 'alternate', :type => 'application/rss+xml', :title => "#{Spud::Core.site_name} Blog RSS", :href => blog_url(:format => :rss)
end


21
22
23
# File 'app/helpers/blog_helper.rb', line 21

def spud_news_rss_link
	return tag(:link, :rel => 'alternate', :type => 'application/rss+xml', :title => "#{Spud::Core.site_name} News RSS", :href => news_url(:format => :rss))
end

#spud_post_archive_selectObject



10
11
12
13
14
15
# File 'app/helpers/blog_helper.rb', line 10

def spud_post_archive_select
	dates = SpudPost.months_with_public_posts
	return select_tag 'archive_date', options_for_select(SpudPost.months_with_public_posts.collect{ |d| 
		[d.strftime('%B %Y'), d.strftime('%Y-%b').downcase]
	}, params[:archive_date]), :include_blank => true, :rel => 'archive'
end

#spud_post_category_selectObject



3
4
5
6
7
8
# File 'app/helpers/blog_helper.rb', line 3

def 
	return select_tag 'category_url_name', 
		options_for_select(SpudPostCategory.options_for_categories(:value => :url_name), params[:category_url_name]), 
		:include_blank => true,
		:rel => 'category'
end