Module: BlogHelper

Defined in:
app/helpers/blog_helper.rb

Instance Method Summary collapse

Instance Method Details



15
16
17
# File 'app/helpers/blog_helper.rb', line 15

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

#spud_post_archive_selectObject



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

def spud_post_archive_select
  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]), :prompt => 'All Dates', :rel => 'archive'
end

#spud_post_category_selectObject



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

def 
  return select_tag('category_url_name',
    options_from_collection_for_select(SpudPostCategory.ordered, :url_name, :name, params[:category_url_name]),
    {:prompt => 'All Categories'})
end