On Tue, Jun 14, 2011 at 12:09 PM, Colin Law <[email protected]> wrote:
> On 14 June 2011 16:32, amritpal pathak <[email protected]> wrote: > > > > > > On Tue, Jun 14, 2011 at 3:46 AM, Colin Law <[email protected]> > wrote: > >> > >> On 14 June 2011 07:19, amritpal pathak <[email protected]> > wrote: > >> > Hey > >> > My app has some buttons and i have route all to different > >> > action > >> > in router.rb file but click on each button results in same action. > why? > >> > Am i missing to specify anything...) > >> > >> Yes, obviously. > >> Show us the code for a couple of the buttons. > > > > Buttons are generted using following code > > <%= button_to "Submit1", :action => "click1"%> > > <%= button_to "Submit2", :action => "click2"%> > > Similarly other buttons have been > > created.obviously there are files in view directory with > > name click1,click2 and so on. > >> > >> Routing.rb file has following stuff > > > > > > Check::Application.routes.draw do > > get "posts/index" > > resources :posts do > > end > > root :to => "posts#click1" > > root :to => "posts#click2" > > end > > I am sorry Amritpal (or John, if that is your name) I give up. You > still seem to have not idea how routing works. I have advised on > numerous occasions that you study the Rails Guide on routing and ask > here if there is something you do not understand. You have never (as > far as I recall) asked for clarification on any of the details in the > guide so presumably you understand it all, yet you obviously have no > idea. > > Either you are winding us up or you need to seriously consider a > different hobby (or career, but hopefully it is just a hobby). > > Sorry again > But sir this time i read the guides but didnt get solution to my > problem.Thats why i asked here. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [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.

