In which controller do you have the “click” action defined?
If it’s in the same controller
yes it is in the same
then you need to define it in your routes too.
namespace :admin do
resources :posts, :collection => {:click => :post}
end
Did exactly
And in the code you had posted, the click method in your controller was
commented, so that may be the issue as well
Sorry, I sent you the rails 2.3 way of routing.
It should have been like this:
namespace “admin” do
resources :posts do
collection do
post :click
end
end
And as Colin said, you can’t have two “root” routes for your app. Keep
one
of them and remove the other one.
On Tue, Jun 21, 2011 at 7:04 PM, amritpal pathak [email protected]wrote:
#resources :posts do
should the changes be in these 2 routes for namespacing rather than as:
You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Also, you may want to read up more on routing.
Here’s a link to official guide, which does a great job of explaining
how
routing works in rails 3
On Tue, Jun 21, 2011 at 7:04 PM, amritpal pathak [email protected]wrote:
#resources :posts do
should the changes be in these 2 routes for namespacing rather than as:
You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I have lost track of how many times Aritpal Pathak has been advised to
read that. Also you might like to try getting him to post the result
of rake routes.
I have lost track of how many times Aritpal Pathak has been advised to
read that.
Sir this time i am your advice and reading it .i got the error while
following section number 2.6 on namespacing.Thats why i posted here and now
got my answer.Now will move ahead on tutorial.
Again thanks to all
That is good. You could try and help Joanne(Yennie) with her problems
if you wished to make a contribution back to the Rails Community.
I have lost track of how many times Aritpal Pathak has been advised to
read that.
Sir this time i am your advice and reading it .i got the error while
following section number 2.6 on namespacing.Thats why i posted here and
now
got my answer.Now will move ahead on tutorial.
Again thanks to all
On 21 June 2011 14:44, Chirag S. [email protected] wrote:
following section number 2.6 on namespacing.Thats why i posted here and
if you wished to make a contribution back to the Rails Community.
Why not!!
is there any mail from her side?
Have you not seen her postings? One of the best ways to learn about a
subject is to read all the threads on the forum and for any questions
where you understand the question then make sure you understand the
answers. In no time you will find yourself answering questions. Her
thread subject is “Error of undefined method”.
Again thanks to all
Why not!!
is there any mail from her side?
Have you not seen her postings? One of the best ways to learn about a
subject is to read all the threads on the forum
ok will follow it.
and for any questions
where you understand the question then make sure you understand the
answers. In no time you will find yourself answering questions. Her
thread subject is “Error of undefined method”.
ok