Topic: Routing problem
New to ruby here, I use windows 7 and using rails installer.
Currently I just learning from podcast, and I encounter this problem.
At first, I create a controller by using
rails generate model Subscriber
and then create a controller by using
rails generate controller Subscribers
and then I modify my controller into
class SubscribersController < ApplicationController
@subscriber = Subscriber.new(:email => params[:email])
@success = "Thank you, You have been subsribed."
@error = @subscriber.errors.full_messages
and then i create the create.html.erb at the view folder
supposedly according to the tutorial I should be able to access it on localhost:3000/subscribers/create
but I got the following message instead
No route matches "/subscribers/create"
So i tick around and add a litle line into my routes.rb
and it is showing the page properly, however when I submit the form it's showing the routing error message again.
Anyone know where I did wrong? pretty sure I followed everything step by step that mentioned on the podcast but the result is very different