Writing new controllers

veejar
Tue, 02 Sep 2008 12:41:04 -0000

I have created new rails-project.
I start Mongrel.

I add to project:

app/controllers/my_first_controller.rb
---------------------------------------------------------
class MyFirstController < ApplicationController
  def index
render :text => '' My First
Controller ''
  end
end

http://192.168.1.1:8080/my_first/ -> all OK!

Then, I add:

app/controllers/my_second_controller.rb
---------------------------------------------------------
class MySecondController < ApplicationController
  def index
render :text => '' My Second
Controller ''
  end
end

I open:
http://192.168.1.1:8080/my_second/

And I have error:
No route matches "/my_second/" with {:method=>:get}


Why?

P.S.: Tested under Mongrel, Thin, Passenger, fastcgi
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org