Module: BlogHelper
- Defined in:
- app/helpers/blog_helper.rb
Instance Method Summary collapse
- #spud_blog_rss_link ⇒ Object
- #spud_news_rss_link ⇒ Object
- #spud_post_archive_select ⇒ Object
- #spud_post_category_select ⇒ Object
Instance Method Details
#spud_blog_rss_link ⇒ Object
17 18 19 |
# File 'app/helpers/blog_helper.rb', line 17 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 |
#spud_news_rss_link ⇒ Object
21 22 23 |
# File 'app/helpers/blog_helper.rb', line 21 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 |
#spud_post_archive_select ⇒ Object
10 11 12 13 14 15 |
# File 'app/helpers/blog_helper.rb', line 10 def spud_post_archive_select dates = SpudPost.months_with_public_posts return select_tag 'archive_date', (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 |
#spud_post_category_select ⇒ Object
3 4 5 6 7 8 |
# File 'app/helpers/blog_helper.rb', line 3 def spud_post_category_select return select_tag 'category_url_name', (SpudPostCategory.(:value => :url_name), params[:category_url_name]), :include_blank => true, :rel => 'category' end |