# Form\_tag help needed

**URL:** <https://www.ruby-forum.com/t/form-tag-help-needed/160635>\
**Category:** Rails\
**Created:** [February 18, 2009, 11:20am UTC](https://www.ruby-forum.com/t/form-tag-help-needed/160635 "2009-02-18T11:20:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [February 18, 2009, 11:20am UTC](https://www.ruby-forum.com/t/form-tag-help-needed/160635/1 "2009-02-18T11:20:05Z")

</div>

Hi  
I have created a model Request and after that created the controller  
for that with the name Request .I have also added in routes.rb  
map.resources :reuests

Now in app/view/requests/new.html.erb I have

\<% form\_tag @onboarding\_request do |f| %\>  
\<% f.submit “Create” %\>  
\<%end %\>

```
     But this goes to the index action of requestscontroller not to

```

the create action But in the view source it is getting as method=“post”

```
  What is the problem here..Why this not going to the create

```

action?Please help

Thanks in advance  
Sijo

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [February 18, 2009, 11:26am UTC](https://www.ruby-forum.com/t/form-tag-help-needed/160635/2 "2009-02-18T11:26:05Z")

</div>

Hi - A couple of syntax issues here, not sure if they are just typing  
errors on this feed or if you have done the same in your app

map.resources :requests (no ‘q’)

submit tag should be \<%= f.submit “Create” %\> so it is rendered.

What do you have in the create method in the controller?

Perhaps it’s redirecting to the index?

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [February 18, 2009, 11:33am UTC](https://www.ruby-forum.com/t/form-tag-help-needed/160635/3 "2009-02-18T11:33:42Z")

</div>

No it is not going to create action(I have a puts statement there) and  
there is no redirect in create action

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [February 18, 2009, 11:18pm UTC](https://www.ruby-forum.com/t/form-tag-help-needed/160635/4 "2009-02-18T23:18:30Z")

</div>

1. Request is a reserved word in Rails; you must choose another name  
for your model.

2. If you’re using RESTful controllers (as Rails scaffolding does by  
default) then your forms will POST to the plural form of your model,  
for example a Blog would POST to /blogs to create. Rails controllers  
understand the REST verbs.
