From: Neil Smith Date: Mon, 6 Jan 2014 11:40:44 +0000 (+0000) Subject: Display and forms seem to work X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=502d4185fa8e0f62d48fe4c70b5cc55c9f0a04ca;p=feedcatcher.git Display and forms seem to work --- diff --git a/app/views/feed/index.html.erb b/app/views/feed/index.html.erb index 8ffe638..9bd98c6 100644 --- a/app/views/feed/index.html.erb +++ b/app/views/feed/index.html.erb @@ -1,6 +1,6 @@

Feeds available

-<% form_tag :action => 'update' do %> +<%= form_tag update_path do %>

Set feed <%= text_field_tag :feed_name, '', :size => 20 %> to include <%= text_field_tag :title, '', :size => 30 %> containing <%= text_field_tag :description, '', :size => 50 %> diff --git a/app/views/feed/show.html.erb b/app/views/feed/show.html.erb index a491835..789debd 100644 --- a/app/views/feed/show.html.erb +++ b/app/views/feed/show.html.erb @@ -1,7 +1,7 @@

Contents of feed <%= h params[:feed_name] %>

<%= link_to("List of all feeds", index_path) %>

-<% form_tag :action => 'update' do %> +<%= form_tag update_path do %>

Set feed <%= text_field_tag :feed_name, h(params[:feed_name]), :size => 20 %> to include <%= text_field_tag :title, '', :size => 30 %> containing <%= text_field_tag :description, '', :size => 50 %> diff --git a/config/routes.rb b/config/routes.rb index 4b69b19..8b7c093 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,7 +8,7 @@ Feedcatcher::Application.routes.draw do get 'index', to: 'feed#index', as: :index get ':feed_name', to: 'feed#show', as: :feed - post '*ignored', to: 'feed#update', as: :update + post '', to: 'feed#update', as: :update # Example of regular route: # get 'products/:id' => 'catalog#view'