Sha256: e33afad647ed822a0c1774e15b1a025e7e8787205b827b6ecb756a42dc802eeb

Contents?: true

Size: 573 Bytes

Versions: 6

Compression:

Stored size: 573 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

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spud_blog-0.7.0 app/helpers/blog_helper.rb
spud_blog-0.6.3 app/helpers/blog_helper.rb
spud_blog-0.6.0 app/helpers/blog_helper.rb
spud_blog-0.5.1 app/helpers/blog_helper.rb
spud_blog-0.5.0 app/helpers/blog_helper.rb
spud_blog-0.4.0 app/helpers/blog_helper.rb