Form without scaffold?

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

John

On May 4, 2011, at 10:06 AM, John shelfer wrote:

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

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/

2011/5/4 John shelfer [email protected]

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Carina B. Silva
http://twitter.com/carinabs8
http://carinabs8.wordpress.com/
“…Estou disposto a demolir paredes,contruir pontes e acender
fogueiras.
Tenho uma grande experincia,um monte de energia,um pouco dessa coisa de
‘viso’ e no tenho medo de comear do zero.”-Steve Jobs

On 8 May 2011 16:29, John shelfer [email protected] wrote:


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?

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

On May 8, 12:39pm, Colin L. [email protected] wrote:

You need to add a route for that action to routes.rb.
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

On May 4, 10:16am, Walter D. [email protected] wrote:

don’t have to use it, but if you are new to Rails, it’s a good idea to
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.

On Sun, May 8, 2011 at 11:29 AM, John shelfer
[email protected]wrote:

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs