Ruby on Rails Monday, January 31, 2011

Can you double-check you did everything listed here:
https://github.com/rails/jquery-ujs

Also, have a look at your HTML source if all js files are included
(and in the correct order).

Simon


On Jan 31, 3:38 am, eka <forer...@gmail.com> wrote:
> Hi,
> I am new to rails and was very pleased to find this thread. After
> reinstalling ruby with
>  rvm ( ruby-1.9.2-p0 [ x86_64 ])
>  installing rails 3.0.3
>  installing gem 'jquery-rails'
>  rails generate jquery:install
>  rails generate scaffold locality name:string type:string
> parent_id:string
>
> There is still the same problem: method delete gets routed to action
> show.
>
> Definig my own delete route may be a workaround. Having scaffolding
> which does not work looks not right.
>
> Ernst
>
> On Jan 27, 8:44 pm, Fearless Fool <li...@ruby-forum.com> wrote:
>
>
>
>
>
>
>
> > Chris Mear wrote in post #977826:
>
> > > The default rails.js that ships with Rails 3 is designed to work with
> > > Prototype; you should replace it with one written to work on jQuery, if
> > > you haven't already:
>
> > >https://github.com/rails/jquery-ujs
>
> > > Chris
>
> > Give that man a cigar!
>
> > Evidently I'd installed the gem but missed the all important:
>
> >   $ rails generate jquery:install
>
> > step.  All better now.
>
> > [Summary for anyone who comes here via google]
>
> > If you're using jQuery, and if you notice that 'link_toobj, :method=>
> > :delete' is failing to trigger your controller's destroy()method, make
> > sure that:
>
> > (a) you have the correct routes set up -- do a rake routes to make sure
> > (b) you've installed the jQuery adaptor gem (and done a 'bundle
> > install')
> > (c) you've called 'rails generate jquery:install'
>
> > [/Summary]
>
> > Thanks, all.
>
> > - ff
>
> > --
> > Posted viahttp://www.ruby-forum.com/.

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

No comments:

Post a Comment