# \<% form\_for(@adv, :url =\> {:action=\>'create'}) do |f| %\>

**URL:** <https://www.ruby-forum.com/t/form-for-adv-url-action-create-do-f/193623>\
**Category:** Rails\
**Created:** [August 20, 2010, 7:41pm UTC](https://www.ruby-forum.com/t/form-for-adv-url-action-create-do-f/193623 "2010-08-20T19:41:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 20, 2010, 7:41pm UTC](https://www.ruby-forum.com/t/form-for-adv-url-action-create-do-f/193623/1 "2010-08-20T19:41:04Z")

</div>

I’m following an example in the “Head First Rails” book, but just  
changed @ad to @adv.

Regarding the following in “new.html.erb”:

\<% form\_for(@adv, :url =\> {:action=\>‘create’}) do |f| %\>

I just want to confirm if I’m correct on that.

- @adv: is the object to which the form is bound to.
- :url =\> {:action=\>‘create’}: this is the action that we will be  
redirected to when clicking the f.submit button.

Is that correct that way?

Thanks.
