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-1.0.2 app/helpers/blog_helper.rb
spud_blog-1.0.1 app/helpers/blog_helper.rb
spud_blog-1.0.0 app/helpers/blog_helper.rb
spud_blog-1.0.0.rc1.1 app/helpers/blog_helper.rb
spud_blog-1.0.0.rc1 app/helpers/blog_helper.rb
tb_blog-1.0.4 app/helpers/blog_helper.rb
tb_blog-1.0.3 app/helpers/blog_helper.rb
spud_blog-0.9.11 app/helpers/blog_helper.rb
tb_blog-1.0.2 app/helpers/blog_helper.rb
tb_blog-1.0.1 app/helpers/blog_helper.rb
tb_blog-1.0 app/helpers/blog_helper.rb
spud_blog-0.9.10 app/helpers/blog_helper.rb
spud_blog-0.9.9 app/helpers/blog_helper.rb
spud_blog-0.9.8 app/helpers/blog_helper.rb
spud_blog-0.9.7 app/helpers/blog_helper.rb
spud_blog-0.9.5 app/helpers/blog_helper.rb
spud_blog-0.9.4 app/helpers/blog_helper.rb
spud_blog-0.9.3 app/helpers/blog_helper.rb
spud_blog-0.9.2 app/helpers/blog_helper.rb
spud_blog-0.9.1 app/helpers/blog_helper.rb