Sha256: 325dd6247eef41d6900da1b2b9d731b42157cae666b464861d55c62bc1b29d14

Contents?: true

Size: 516 Bytes

Versions: 4

Compression:

Stored size: 516 Bytes

Contents

module BlogHelper

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

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

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spud_blog-0.1.3 app/helpers/blog_helper.rb
spud_blog-0.1.2 app/helpers/blog_helper.rb
spud_blog-0.1.1 app/helpers/blog_helper.rb
spud_blog-0.1.0 app/helpers/blog_helper.rb