[Rails] Re: No route matches?
can you reach to index action, or it is inaccessible too?
On Aug 21, 11:58 am, DanielMedia <danielmedi...@gmail.com> wrote:
> 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