# No action responded to create

**URL:** <https://www.ruby-forum.com/t/no-action-responded-to-create/141714>\
**Category:** Rails\
**Created:** [June 29, 2008, 11:40pm UTC](https://www.ruby-forum.com/t/no-action-responded-to-create/141714 "2008-06-29T23:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cristina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/cdc98d/32.png) [@cristina](https://www.ruby-forum.com/u/cristina)\
**Post date:** [June 29, 2008, 11:40pm UTC](https://www.ruby-forum.com/t/no-action-responded-to-create/141714/1 "2008-06-29T23:40:14Z")

</div>

## Hey guys!Ihave a problem with a nested resource: when i subbmit the new page i receive:No action responded to create the controller :

## def create @entry = @user.entries.new(params[:entry]) respond\_to do |format| if @entry.save flash[:notice] = ‘Entry was successfully created.’ format.html { redirect\_to([@user, @entry]) } format.xml { render :xml =\> @registration, :status =\> :created, :location =\> [@user, @entry] } else format.html { render :action =\> “new” } format.xml { render :xml =\> @entry.errors, :status =\> :unprocessable\_entity } end end end routes.rb:

map.resources :users, :member =\> { :enable =\> :put } do |users|  
users.resources :roles  
users.resources :entries do |entry|  
entry.resources :comments  
end

## end new entry view:

# New Blog Entry

\<%= error\_messages\_for :entry %\>

\<% form\_for(:entry, :url =\> user\_entries\_path) do |f| %\>

Title:  
\<%= f.text\_field :title, :size =\> 40 -%\>

Blog Entry:  
\<%= f.text\_area :body, :rows =\> 10, :cols =\> 60 - %\>

\<%= f.submit "Create" %\>

\<% end %\>

\<%= link\_to ‘Back’, user\_entries\_path(@user) %\>

please heeeelp!!!

---

<div class="post-metadata">

**Author:** ![cristina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/cdc98d/32.png) [@cristina](https://www.ruby-forum.com/u/cristina)\
**Post date:** [June 30, 2008, 11:28am UTC](https://www.ruby-forum.com/t/no-action-responded-to-create/141714/2 "2008-06-30T11:28:29Z")

</div>

cristina wrote:

> Hey guys!Ihave a problem with a nested resource: when i subbmit the  
> new page i receive:No action responded to create  
> the controller :
> 
> […]
> 
> * * *
> 
> # New Blog Entry
> 
> \<%= error\_messages\_for :entry %\>
> 
> \<% form\_for(:entry, :url =\> user\_entries\_path) do |f| %\>
> 
> Title:  
> \<%= f.text\_field :title, :size =\> 40 -%\>
> 
> Blog Entry:  
> \<%= f.text\_area :body, :rows =\> 10, :cols =\> 60 - %\>
> 
> \<%= f.submit "Create" %\>
> 
> \<% end %\>
> 
> \<%= link\_to ‘Back’, user\_entries\_path(@user) %\>

I think you should add the user to your form url which means it should  
be “:url =\> user\_entries\_path(@user)” where @user is the variable set  
once logged in or so.

Guillaume Petit  
[www.nomadsper.com](http://www.nomadsper.com)
