[Rails] No route matches?
Hi all,
I'm coming from the PHP world and I'm trying to learn Ruby and Rails.
I'm having a problem where I keep getting the error "No route matches /
home/view" even though I have it defined it. I'd appreciate any help
on this. I'm using rails 3.0 and the setting for the environment is
"development".
# routes.rb
Site::Application.routes.draw do
get "home/index"
root :to => "home#index"
end
# home_controller.rb
class HomeController < ApplicationController
def index
@page_title = "Home"
end
def view
@page_title = "View page"
end
end
and I have two view files in app/views/home:
index.html.erb
view.html.erb
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home