On 28 May 2011 19:24, Bryan Crossland <bacrossl...@gmail.com> wrote:
> On Sat, May 28, 2011 at 11:30 AM, Frederick Cheung
> <frederick.che...@gmail.com> wrote:
>>
>>
>> On May 28, 3:06 pm, amritpal pathak <amritpalpath...@gmail.com> wrote:
>> > Hey
>> >       I am using rails 3.0.7.I created two buttons simply as:
>> >      <%= button_to "Great", :action => "click"%>
>> >      <%= button_to "click me", :action => "work"%>
>> >
>> > Router.rb file looks like:
>> >
>> > Check::Application.routes.draw do
>> >  # get "gne/clg"
>> >
>> >   get "posts/index"
>> >   resources :posts do
>> >    end
>> > #get 'posts/click'
>> >
>> > ActionController::Routing::Routes.draw do |map|
>> > map.root :controller => "posts", :action => "click"
>> > end
>> >
>> > ActionController::Routing::Routes.draw do |map|
>> > map.root :controller => "posts", :action => "work"
>> > end
>> >  end
>>
>> First off you don't need that ActionController::Routing::Routes.draw
>> stuff if you use the rails 3 syntax.
>> root :to => "posts#click"
>>
>> Secondly you're mapping both your actions to the same path - you need
>> to map them to different paths if you want rails to know which action
>> to route to when the request arrives.
>>
>
> Third please stop posting the same question as two different people (John S
> Shelfer and Amritpal Pathak). Use one email address and one identity then
> wait for someone to respond.

I had not realised till just now that John Shelfer is also Amritpal
Pathak that has caused so much strain on our patience in the past.  I
think he/she is a wind up merchant just getting us all to waste our
time.

Colin

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to