Greetings All,
I have an interesting issue that I can only assume is me doing something
dumb.
======
I have the following route defined
map.namespace(:admin) do |admin|
admin.resources :users
end
======
I have a form:
- form_for @user, :url=>admin_user_path do |f|
======
and an rspec
require ‘spec_helper’
describe “/admin/users/edit.html.haml” do
it “renders edit admin user form” do
@user = mock_model(User)#Factory.create(:valid_user)
assigns[:user] = @user
render
end
end
======
it produces the following error when ran
ActionView::TemplateError: admin_user_url failed to generate from
{:action=>“show”, :controller=>“admin/users”} - you may have ambiguous
routes, or you may need to supply additional parameters for this route.
content_url has the following required parameters: [“admin”, “users”,
:id]
-
are they all satisfied?
On line #1 of app/views/admin/users/edit.html.haml1: - form_for @user, :url=>admin_user_path do |f|
2: %p(eval):16:in `admin_user_path’
========
This form works when I fire up WEBrick and navigate to it manually.
========
What am I doing wrong?
Brandon