# Submit\_tag or f.submit

**URL:** <https://www.ruby-forum.com/t/submit-tag-or-f-submit/177518>\
**Category:** Rails\
**Created:** [October 19, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/submit-tag-or-f-submit/177518 "2009-10-19T16:54:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![risknet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/dbc845/32.png) [@risknet](https://www.ruby-forum.com/u/risknet)\
**Post date:** [October 19, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/submit-tag-or-f-submit/177518/1 "2009-10-19T16:54:24Z")

</div>

Hello all,

I am pretty much new here, trying to move to RoR from .net world.  
I will appreciate if anyone clarifies this for me.

Most of books use “submit\_tag” in new or edit views, but I see Rails API  
web documents use “f.submit” instead. I also see Agile Web D.  
using RoR 3rd Edition use the same “f.submit” instead of “submit\_tag.”

Which way is mostly recommended?  
I am using the latest version of rails, and I am still get confused how  
Rails know if the post is “Create” or “Update” with this one single  
“submit\_tag.”

I will appreciate it for your help in advance.

- risknet -

---

<div class="post-metadata">

**Author:** ![risknet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/dbc845/32.png) [@risknet](https://www.ruby-forum.com/u/risknet)\
**Post date:** [October 19, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/submit-tag-or-f-submit/177518/2 "2009-10-19T17:42:21Z")

</div>

Hello Jae L.;

On Mon, 2009-10-19 at 16:54 +0200, Jae L. wrote:

> Which way is mostly recommended?

I use submit\_tag instead of f.submit when I want easy access to the  
options provided by submit\_tag. The :confirm option is handy on  
‘Cancel’, for example.

HTH,  
Bill
