Ver código fonte

Added route and link to manually fetch feeds

master
Adrian Short 12 anos atrás
pai
commit
84ea932ba7
2 arquivos alterados com 7 adições e 1 exclusões
  1. +2
    -0
      app/views/feeds/index.html.haml
  2. +5
    -1
      config/routes.rb

+ 2
- 0
app/views/feeds/index.html.haml Ver arquivo

@@ -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



+ 5
- 1
config/routes.rb Ver arquivo

@@ -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.


Carregando…
Cancelar
Salvar