# Why does form\_for @story has to have Story as RESTful

**URL:** <https://www.ruby-forum.com/t/why-does-form-for-story-has-to-have-story-as-restful/168697>\
**Category:** Rails\
**Created:** [May 24, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/why-does-form-for-story-has-to-have-story-as-restful/168697 "2009-05-24T16:04:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [May 24, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/why-does-form-for-story-has-to-have-story-as-restful/168697/1 "2009-05-24T16:04:00Z")

</div>

it seems that when we use

form\_for @story do |f|

then Story has to be a RESTful resource and it has to be

map.resources :stories

in the routes.rb?

can Story be not RESTful? Can it be a form for non-RESTful data?

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [May 24, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/why-does-form-for-story-has-to-have-story-as-restful/168697/2 "2009-05-24T16:45:42Z")

</div>

“can Story be not RESTful? Can it be a form for non-RESTful data?”

Sure. Keep in mind one of the Rails tenets: “convention over  
configuration”.

Take a look at the HTML generated by form\_for in the various REST  
contexts (e.g. new, edit). _By default_ it Does The Right Thing if  
you’re using RESTful resources.

But there’s nothing to stop you from overriding the configuration, e.g.:

```
form_for @order, :url => checkout_details_path, :method => :put do 

```

|f|

and having a route to support it.

dwh
