The problem is it isn't declared, but somewhere something is trying to
use it.

The scaffold can be nice as a quickstart, but as you're trying to do
something new you're going to have to make changes to the views (and
the controllers too if they use named routes instead of :action
=> :whatever redirects).

A few things to try while tracking it down:

Look at the dev log (or your script/server output) for more
information on the error. It should mention view templates in there
somewhere, and that'll help you find the file & line number to blame.
The stack trace should be in the browser error page as well if you are
in development mode.

Project search for the text contact_path and change it to
admin_contact_path or whatever is appropriate

Look for any forms that are using @contact instead of [:admin,
@contact]
(the symbol tells it about the routing namespace).

HTH

Nick

On Jun 20, 8:08 pm, Sebastian <sebastian.puch...@gmail.com> wrote:
> Hi everyone!
> Im having troubles with my routes.rb, i set map.namespace :admin so i
> can enter to my scaffold 'contacts' via admin/contacts', but the view
> its crashing showing this error:; *undefined method `contact_path' for
> #<ActionView::Base:0xb6743be4>*
>
> The question is: 'where is *contact_path* variable declared?'

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to