# No action responded to create : Not asking for create!

**URL:** <https://www.ruby-forum.com/t/no-action-responded-to-create-not-asking-for-create/180201>\
**Category:** Rails\
**Created:** [December 14, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/no-action-responded-to-create-not-asking-for-create/180201 "2009-12-14T17:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevoke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Post date:** [December 14, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/no-action-responded-to-create-not-asking-for-create/180201/1 "2009-12-14T17:12:30Z")

</div>

This is my bold attempt at creating something -without- the ‘generate’  
script. No scaffold, just barebone man work!  
Of course, it breaks. Let’s see how far I can push the conversation  
before I can’t answer my own questions.

WHAT BREAKS?  
This is my view in HAML:  
— index.html.haml —  
%h1  
%center Improperly named unread ultrasounds  
%p  
=button\_to\_remote “Fix ultrasounds”, {:action =\> ‘fix\_ultrasounds’,  
:controller =\> ‘ultrasounds’, :update =\> “results”}  
#results  
=render :text =\> “”  
%table  
%tr  
%th Procedure  
%th Key

- @broken\_ultrasounds.each do |us|  
%tr{ :class =\> cycle(“even”, “odd”) }  
%td= us[0]  
%td= us[1]

* * *

The “button\_to\_remote” gives me the following error when I click on it:  
Unknown action  
No action responded to create. Actions: fix\_ultrasounds and index

Okay, well, WHAT DO THE LOGS SAY?

Processing UltrasoundsController#index (for 127.0.0.1 at 2009-12-14  
10:59:45) [GET]  
Rendering template within layouts/application  
Rendering ultrasounds/index  
Completed in 297ms (View: 16, DB: 0) | 200 OK  
[[http://localhost/ultrasounds](http://localhost/ultrasounds)]

Processing UltrasoundsController#create (for 127.0.0.1 at 2009-12-14  
10:59:46) [POST]  
Parameters:  
{“authenticity\_token”=\>“I7ucDb3iTXMpaFeRdCjTGtu6qFSgSq92VBCKg4SIcFA=”

* * *

Why is it asking for “create” ? It should ask for “fix\_ultrasounds”,  
which is a valid method. As the error message indicates, I only have two  
actions in the “ultrasounds” controller …

---

<div class="post-metadata">

**Author:** ![trevoke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Post date:** [December 14, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/no-action-responded-to-create-not-asking-for-create/180201/2 "2009-12-14T18:03:53Z")

</div>

Aldric G. wrote:

> %center Improperly named unread ultrasounds

Just a pet peeve of mine, but the tag is deprecated from HTML  
4.01+. You should start using CSS instead.

> Why is it asking for “create” ? It should ask for “fix\_ultrasounds”,  
> which is a valid method. As the error message indicates, I only have two  
> actions in the “ultrasounds” controller …

It’s a bit difficult to answer without seeing your routes configuration.  
It might also be useful to see your controller code. My guess is that  
you have no properly configured your routes.rb file.

---

<div class="post-metadata">

**Author:** ![trevoke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Post date:** [December 14, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/no-action-responded-to-create-not-asking-for-create/180201/3 "2009-12-14T18:05:17Z")

</div>

Aldric G. wrote:

> This is my bold attempt at creating something -without- the ‘generate’  
> script. No scaffold, just barebone man work!  
> Of course, it breaks.

> =button\_to\_remote “Fix ultrasounds”, {:action =\> ‘fix\_ultrasounds’,  
> :controller =\> ‘ultrasounds’, :update =\> “results”}

Fixed with:

=button\_to\_remote “Fix ultrasounds”, :update =\> “results”, :url =\>  
{:action =\> ‘fix\_ultrasounds’, :controller =\> ‘ultrasounds’}

Two small tiny changes.
