Sha256: 72351405b412f4501d6b0a6e59c12e24fb71c8c4d75845bfb29b7e32c551d964

Contents?: true

Size: 942 Bytes

Versions: 41

Compression:

Stored size: 942 Bytes

Contents

module BlogHelper

	def spud_post_category_select
		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

	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

	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

	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

end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
spud_blog-0.9.0 app/helpers/blog_helper.rb
spud_blog-0.8.18 app/helpers/blog_helper.rb
spud_blog-0.8.17 app/helpers/blog_helper.rb
spud_blog-0.8.16 app/helpers/blog_helper.rb
spud_blog-0.8.15 app/helpers/blog_helper.rb
spud_blog-0.8.14 app/helpers/blog_helper.rb
spud_blog-0.8.13 app/helpers/blog_helper.rb
spud_blog-0.8.12 app/helpers/blog_helper.rb
spud_blog-0.8.11 app/helpers/blog_helper.rb
spud_blog-0.8.8 app/helpers/blog_helper.rb
spud_blog-0.8.7 app/helpers/blog_helper.rb
spud_blog-0.8.6 app/helpers/blog_helper.rb
spud_blog-0.8.5 app/helpers/blog_helper.rb
spud_blog-0.8.4 app/helpers/blog_helper.rb
spud_blog-0.8.3 app/helpers/blog_helper.rb
spud_blog-0.8.2 app/helpers/blog_helper.rb
spud_blog-0.8.1 app/helpers/blog_helper.rb
spud_blog-0.8.0 app/helpers/blog_helper.rb
spud_blog-0.7.5 app/helpers/blog_helper.rb
spud_blog-0.7.4 app/helpers/blog_helper.rb