I am trying to build a `simple_form_for` in Rails 3.2 for `@objects` with a doubly nested route, e.g.:

```
/users/1/projects/2/objects

```

The form is:

```
<%= simple_form_for @object, :url => user_project_objects_path(@user, @project), :html => { :class => 'form-horizontal' } do |f| %>

```

In routes.rb:

```
resources :users do
  resources :projects do
    resources :objects do
      collection { post :import }
    end
  end
end

```

My question is: what goes in the `new` and `create` action of the `Object` controller?

So far - and I am getting a routing error - I have:

```
def create
  @user = current_user
  @project = Project.find_by_user_id(@user)
  @object = @project.objects.build(params[:object])
  if @object.save
    flash[:notice] = "Object was successfully created"
    redirect_to user_project_objects_path
  else
    render 'new'
  end
end

def new
  @user = current_user
  @project = Project.find_by_user_id(@user)
  @object = @project.objects.build
end

```

Any advice is much appreciated.

### In response to Greg W:

```
No route matches {:action=>"edit", :controller=>"objects", :user_id=>#<Object id: 8, source_lang_id: 1, source_content: "Kaffehaus", target_lang_id: 2, target_content: "cafe", domain_id: 2, owner_id: nil, created_at: "2013-01-04 06:36:55", updated_at: "2013-01-04 06:36:55", project_id: 2>}

```

The `owner_id` (User, i.e. current\_user) is not being updated - and this may be the issue(?)