beef-articles 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -76,14 +76,14 @@ module ArticlesHelper
76
76
  grouped_by_year = all_articles.group_by{ |a| a.published_at.year }.sort.reverse
77
77
  grouped_by_year.each do |year, articles|
78
78
  html << '<li>'
79
- html << link_to("#{year}", {:controller => '/articles', :action => 'index', :year => year, :month => nil, :day => nil})
79
+ html << link_to("#{year}", {:controller => 'articles', :action => 'index', :year => year, :month => nil, :day => nil})
80
80
  html << (" (#{articles.size})")
81
81
  if this_year.to_i == year
82
82
  grouped_by_month = articles.group_by{ |a| a.published_at.month }.sort.reverse
83
83
  html << '<ul>'
84
84
  grouped_by_month.each do |month, articles|
85
85
  html << '<li>'
86
- html << link_to("#{Date::MONTHNAMES[month]}", {:controller => '/articles', :action => 'index', :year => year, :month => month, :day => nil})
86
+ html << link_to("#{Date::MONTHNAMES[month]}", {:controller => 'articles', :action => 'index', :year => year, :month => month, :day => nil})
87
87
  html << (" (#{articles.size})")
88
88
  html << '</li>'
89
89
  end
data/config/routes.rb CHANGED
@@ -2,16 +2,14 @@ ActionController::Routing::Routes.draw do |map|
2
2
  map.resources :categories, :has_many => :articles
3
3
 
4
4
  map.with_options :controller => 'articles', :action => 'index' do |articles|
5
- articles.articles_tagged 'articles/tagged/:tag'
6
- articles.articles_tagged_format 'articles/tagged/:tag.:format'
7
- articles.articles_authored 'articles/author/:permalink'
8
- articles.articles_authored_format 'articles/author/:permalink.:format'
9
5
  articles.articles_day 'articles/:year/:month/:day',
10
6
  :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
11
7
  articles.articles_month 'articles/:year/:month',
12
8
  :year => /\d{4}/, :month => /\d{1,2}/
13
9
  articles.articles_day 'articles/:year',
14
10
  :year => /\d{4}/
11
+ articles.articles_tagged 'articles/tagged/:tag.:format'
12
+ articles.articles_authored 'articles/author/:permalink.:format'
15
13
  end
16
14
  map.article_permalink 'articles/:year/:month/:day/:permalink',
17
15
  :controller => 'articles', :action => 'show',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-articles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England