Form without scaffold ?

Hi
     Strange to Rails.Read the tutorial on Scaffold.Can i generate a
Simple form without using Scaffold?

John

yes… There are some helps for construct a form. For exemple, form_for and form_for_tag. Apidoc teach how construct with these helps. Look: http://apidock.com/rails/

Hi
    Strange to Rails.Read the tutorial on Scaffold.Can i generate a
Simple form without using Scaffold?

John

Scaffold is there to get you started, and to provide a good mainstream example of how a form should be presented, processed, and routed. You don't have to use it, but if you are new to Rails, it's a good idea to try it out on a scratch project before you start re-inventing the wheel long-hand.

There's a lot of good reasons to stay on the rails (metaphorically speaking) and do things the way that Scaffold does, at least until you are sure of what you're doing.

The Rails Guides are a great thing to read and work through, and make sure you use the version that matches your version of Rails. If it's 3, you need to be sure that any tutorial is geared toward that version, as the commands have changed slightly, and some of the conventions have been simplified. If you're using 2.3, then vice-versa.

Walter

I created a button and add a action to it as:
<%= button_to 'Add to Cart', :action => 'Click' %>

And then made a empty method named "click" in controller ,so now when
i clicked on buttton it says:
No route matches {:controller=>"store", :action=>"click"}
what is error?

Help please

Thanks.

You need to add a route for that action to routes.rb. Have a look at
the Rails Guide on Routing which describes how routing works.

Colin

I added a route to action in routes.rb file as following
but still error persist.I am using rails 3.0.7.Is there any syntax
error or am missing anything else?

map.connect '/store/click', :controller => 'store', :action =>
'click'

Thanks

Hi

Strange to Rails.Read the tutorial on Scaffold.Can i generate a

Simple form without using Scaffold?

John

Scaffold is there to get you started, and to provide a good mainstream

example of how a form should be presented, processed, and routed. You

don’t have to use it, but if you are new to Rails, it’s a good idea to

try it out on a scratch project before you start re-inventing the

wheel long-hand.

There’s a lot of good reasons to stay on the rails (metaphorically

speaking) and do things the way that Scaffold does, at least until you

are sure of what you’re doing.

The Rails Guides are a great thing to read and work through, and make

sure you use the version that matches your version of Rails. If it’s

3, you need to be sure that any tutorial is geared toward that

version, as the commands have changed slightly, and some of the

conventions have been simplified. If you’re using 2.3, then vice-versa.

Walter

I created a button and add a action to it as:

<%= button_to ‘Add to Cart’, :action => ‘Click’ %>

Is this bring not RESTful? Since the action is not CRUD.