Not running with 3.1.1
capripot opened this issue · 5 comments
I'm trying to transform a Rails 2.3.14 to 3.1.1 application.
Prototype rails should provide all the lost remote_foo..
But it doesn't work at all for me. It's like if the gem was not enable anymore.
I installed it, reinstalled it, bundle install/update, add/remove/add gem into Gemfile, test it as a plugin, everything, but I still have got this error "undefined method `remote_function' ".
The function seams to be there, into the prototype-rails gem into prototype helpers file, but my application don't see it, why ? Do you have an idea ?
I dont know about prototype-rails but the remote_* helpers were all removed in 3.0 and you need to pass :remote => true to the helpers to get the functionality.
Yes I know, but the prototype-rails gem should make these helpers work, am
I wrong ?
2011/11/12 Vijay Dev <
reply@reply.github.com
I dont know about prototype-rails but the remote_* helpers were all
removed in 3.0 and you need to pass:remote => trueto the helpers to
get the functionality.
Reply to this email directly or view it on GitHub:
#6 (comment)
Capripot / www.capripot.com / www.capripot.info
capricot: in case you have not found out yet, you are looking for the prototype_legacy_helper plugin. This is separate from prototype-rails.
I cannot reproduce this issue. This session is using rails 3.1.1 with prototype-rails 3.1.0:
fxn@rails:~/tmp/test-6 $ cat config/routes.rb
Test6::Application.routes.draw do
resource :test
end
fxn@rails:~/tmp/test-6 $ cat app/controllers/tests_controller.rb
class TestsController < ApplicationController
end
fxn@rails:~/tmp/test-6 $ cat app/views/tests/show.html.erb
<%= remote_function(:url => '/foo') %>
fxn@rails:~/tmp/test-6 $ cat app/assets/javascripts/application.js
//= require prototype
//= require prototype_ujs
//= require_tree .
fxn@rails:~/tmp/test-6 $ ack prototype Gemfile
gem 'prototype-rails'
fxn@rails:~/tmp/test-6 $ curl --silent http://localhost:3000/test | ack Ajax
new Ajax.Request('/foo', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('m/ec+/DZeiwYlCeDDDKTrGWy99xWNW4ATz4N1so5hb0=')})
I've also tested with rails 3.2.1 and prototype-rails 3.2.1, and it also works.
Do you see anything relevant that differs in your application?
So, seems to be working fine to me.
I am going to close the issue, but please if you think there's still something to fix feel free to reopen.