Browse Source

Added route and link to manually fetch feeds

master
Adrian Short 12 years ago
parent
commit
84ea932ba7
2 changed files with 7 additions and 1 deletions
  1. +2
    -0
      app/views/feeds/index.html.haml
  2. +5
    -1
      config/routes.rb

+ 2
- 0
app/views/feeds/index.html.haml View File

@@ -9,6 +9,7 @@
%th %th
%th %th
%th %th
%th


- @feeds.each do |feed| - @feeds.each do |feed|
%tr %tr
@@ -21,6 +22,7 @@
- else - else
= time_ago_in_words feed.last_fetched = time_ago_in_words feed.last_fetched
ago ago
%td= link_to "Fetch", fetch_feed_url(feed)
%td= link_to 'Edit', edit_feed_path(feed) %td= link_to 'Edit', edit_feed_path(feed)
%td= link_to 'Delete', feed, :confirm => "Delete #{feed.title} and all its posts?", :method => :delete %td= link_to 'Delete', feed, :confirm => "Delete #{feed.title} and all its posts?", :method => :delete




+ 5
- 1
config/routes.rb View File

@@ -1,5 +1,9 @@
Apollo::Application.routes.draw do Apollo::Application.routes.draw do
resources :feeds
resources :feeds do
member do
get 'fetch'
end
end


# The priority is based upon order of creation: # The priority is based upon order of creation:
# first created -> highest priority. # first created -> highest priority.


Loading…
Cancel
Save