How to make track assistants for this route?
resources :news match 'news/:year/:month/:day' => 'news#show', :constraints => { :year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/ }, :as => 'newsdate'
I tried many ways, but it does not work:
link_to news.created_at.strftime '%d.%m.%Y ', newsdate_path(:year => '2011', :month => '11', :day => '11')
I get an application error for this line using GET http: // localhost: 3000 / news :
ArgumentError in News#index Showing /home/foxweb/work/dev/app/views/news/index.html.slim where line #6 raised: wrong number of arguments (2 for 1)
How to make the right way?
PS http: // localhost: 3000 / news / 2011/11/11 works fine.
source share