Submit_tag or f.submit

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

I will appreciate it for your help in advance.

  • risknet -

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.