# Rails 2.3.8 and form\_tag usage

**URL:** <https://www.ruby-forum.com/t/rails-2-3-8-and-form-tag-usage/192682>\
**Category:** Rails\
**Created:** [August 4, 2010, 12:05am UTC](https://www.ruby-forum.com/t/rails-2-3-8-and-form-tag-usage/192682 "2010-08-04T00:05:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crashbangboom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9e8a1a/32.png) [@crashbangboom](https://www.ruby-forum.com/u/crashbangboom)\
**Post date:** [August 4, 2010, 12:05am UTC](https://www.ruby-forum.com/t/rails-2-3-8-and-form-tag-usage/192682/1 "2010-08-04T00:05:43Z")

</div>

I have just upgraded my entire system to use the subject line version  
of rails…of course…this broke my previous rails apps as many  
things are handled a bit differently…!

I have all apps running fine now but am having a problem when using  
form\_tag over form\_for…(I need form\_tag so I can use ‘select’ drop-  
downs and can find no such usage for form-for)…

Here’s the error I get:  
Unknown action  
No action responded to 8. Actions: create, destroy, edit, index, new,  
show, and update

Here’s the form code:  
\<% form\_tag :action =\> ‘update’, :id =\> @tankticket do %\>  
\<%= render :partial =\> ‘form’ %\>  
\<%= submit\_tag ‘Update’ %\>  
\<% end %\>

Here’s the update code:  
def update  
@tankticket = Tankticket.find(params[:id])

```
respond_to do |format|
  if @tankticket.update_attributes(params[:tankticket])
    format.html { redirect_to(@tankticket, :notice => 'Tankticket

```

was successfully updated.’) }  
format.xml { head :ok }  
else  
format.html { render :action =\> “edit” }  
format.xml { render :xml =\> @tankticket.errors, :status  
=\> :unprocessable\_entity }  
end  
end  
end

It’s gotta be something simple that I’m missing…and…I’m thinking  
it’s in the ‘form\_tag’ code…dunno

---

<div class="post-metadata">

**Author:** ![crashbangboom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9e8a1a/32.png) [@crashbangboom](https://www.ruby-forum.com/u/crashbangboom)\
**Post date:** [August 4, 2010, 11:01am UTC](https://www.ruby-forum.com/t/rails-2-3-8-and-form-tag-usage/192682/2 "2010-08-04T11:01:19Z")

</div>

On 3 August 2010 23:04, crashbangboom [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have just upgraded my entire system to use the subject line version  
> of rails…of course…this broke my previous rails apps as many  
> things are handled a bit differently…!
> 
> I have all apps running fine now but am having a problem when using  
> form\_tag over form\_for…(I need form\_tag so I can use ‘select’ drop-  
> downs and can find no such usage for form-for)…

Just use f.select

> Here’s the error I get:  
> Unknown action  
> No action responded to 8. Actions: create, destroy, edit, index, new,  
> show, and update

When does that happen?  
Check in the log to see what is happening. Show us some more of the  
log if you cannot see it, from the render of the view you have shown  
below to the end.

Colin

---

<div class="post-metadata">

**Author:** ![crashbangboom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9e8a1a/32.png) [@crashbangboom](https://www.ruby-forum.com/u/crashbangboom)\
**Post date:** [August 4, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/rails-2-3-8-and-form-tag-usage/192682/3 "2010-08-04T18:06:26Z")

</div>

Thanks Colin…

The Unkown Action error in my original post is all the error I  
get…sorry  
f.select is not an option in ‘form\_for’…I tried that…!

---

<div class="post-metadata">

**Author:** ![crashbangboom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9e8a1a/32.png) [@crashbangboom](https://www.ruby-forum.com/u/crashbangboom)\
**Post date:** [August 4, 2010, 6:09pm UTC](https://www.ruby-forum.com/t/rails-2-3-8-and-form-tag-usage/192682/4 "2010-08-04T18:09:54Z")

</div>

crashbangboom wrote:  
[…]

> f.select is not an option in ‘form\_for’…I tried that…!

Sure it is. If you’re getting errors, fix the errors. If you can’t do  
that, share them with the list. But f.select should absolutely work.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
