Re: [Rails] Re: Problem with submit button

2012-06-23 Thread Colin Law
On 23 June 2012 00:02, cyber c. wrote: > I can specify the controller using > :url => {:action => 'XYZ'} > But since I don't have ( nor need) a model file for the form , so what > should i write here "?" > <%= form_for (?) do |f| %> If you have not got an object to populate the form then you can

Re: [Rails] Re: Problem with submit button

2012-06-22 Thread aash dhariya
u need to do this form_for(:mode, :url => {:action => "action_name", :controller => "controller_name"}) and in the routes file, u need to add post "static_pages/main" "contoller_name#action_name" On Sat, Jun 23, 2012 at 4:32 AM, cyber c. wrote: > I can specify the controller using > :url => {:ac

[Rails] Re: Problem with submit button

2012-06-22 Thread cyber c.
I can specify the controller using :url => {:action => 'XYZ'} But since I don't have ( nor need) a model file for the form , so what should i write here "?" <%= form_for (?) do |f| %> -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Googl

Re: [Rails] Re: Problem with submit button

2012-06-22 Thread Arnaud Augier
Sorry didn't finished my previous message I'm on my phone. First of all, read http://guides.rubyonrails.org/getting_started.html You'll understand how to start and you'll understand what you need to do in your controller and your routes.rb. Le 22 juin 2012 23:05, "Arnaud Augier" a écrit : > Ch

Re: [Rails] Re: Problem with submit button

2012-06-22 Thread Arnaud Augier
Check http://guides.rubyonrails.org/routing.html You'll find everything you need to understand how to configure your routes. Le 22 juin 2012 21:24, "cyber c." a écrit : > routes.rb have only these > > get "staticpages/main" > get "staticpages/movie" > get "staticpages/book" > > How do i add a ro

[Rails] Re: Problem with submit button

2012-06-22 Thread cyber c.
routes.rb have only these get "staticpages/main" get "staticpages/movie" get "staticpages/book" How do i add a route to post method? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to

Re: [Rails] Re: problem with submit button in rails 3

2011-09-21 Thread Colin Law
On 21 September 2011 16:35, Everaldo Gomes wrote: > > > On Wed, Sep 21, 2011 at 12:29 PM, Pab wrote: >> >> hi >>   well i am have having contoller named ProductController >> but its asking for ProductsController >> i don't know how to over come this problem? >> > Hi, > rename your controller from

Re: [Rails] Re: problem with submit button in rails 3

2011-09-21 Thread Everaldo Gomes
On Wed, Sep 21, 2011 at 12:29 PM, Pab wrote: > > hi > well i am have having contoller named ProductController > but its asking for ProductsController > i don't know how to over come this problem? > > Hi, rename your controller from ProductController to ProductsController. In Rails, the convent

[Rails] Re: problem with submit button in rails 3

2011-09-21 Thread Tim Shaffer
It's Rails convention that controllers should use the plural name of the model, like Product*s*Controller You could probably make it work by using the singular name of the model, but it would go against convention and wouldn't be very easy to maintain. -- You received this message because you

[Rails] Re: problem with submit button in rails 3

2011-09-21 Thread Pab
hi well i am have having contoller named ProductController but its asking for ProductsController i don't know how to over come this problem? thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send em

[Rails] Re: problem with submit button in rails 3

2011-09-21 Thread Tim Shaffer
Do you have a controller named ProductsController? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/sUuMsWHWdxoJ. To post to this group, send emai