From 84ea932ba79347a234c13b02bf935752906474df Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Thu, 21 Jun 2012 18:11:14 +0100 Subject: [PATCH] Added route and link to manually fetch feeds --- app/views/feeds/index.html.haml | 2 ++ config/routes.rb | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/feeds/index.html.haml b/app/views/feeds/index.html.haml index 3ca51fd..ec08b04 100644 --- a/app/views/feeds/index.html.haml +++ b/app/views/feeds/index.html.haml @@ -9,6 +9,7 @@ %th %th %th + %th - @feeds.each do |feed| %tr @@ -21,6 +22,7 @@ - else = time_ago_in_words feed.last_fetched ago + %td= link_to "Fetch", fetch_feed_url(feed) %td= link_to 'Edit', edit_feed_path(feed) %td= link_to 'Delete', feed, :confirm => "Delete #{feed.title} and all its posts?", :method => :delete diff --git a/config/routes.rb b/config/routes.rb index 1f1df65..a87de55 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,9 @@ Apollo::Application.routes.draw do - resources :feeds + resources :feeds do + member do + get 'fetch' + end + end # The priority is based upon order of creation: # first created -> highest priority.