AS with Rails 3.0 : Ajax not sending back partials...

20 views
Skip to first unread message

guillaume

unread,
Oct 2, 2011, 4:17:40 PM10/2/11
to actives...@googlegroups.com
Hello,

I've a problem with AS rails 3.0 compatible version.
My AS table is loading fine, but when i attend to do any ajax action (search, click on pagination etc.) the request is sent, but the server answer the request by sending back an entire view (not only the partial), then nothing is rendered... (i used firebug to find out).

Here is me gem list :

gem 'active_scaffold_vho', :git => 'git://github.com/vhochstein/active_scaffold.git', :branch => 'rails-3.0'
gem 'active_scaffold_export_vho'
gem 'render_component_vho'


Then in my AS layout i use :

<html>
...
<%= stylesheet_link_tag 'administration.css'%>
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js', 'jquery-ui', 'jquery_ujs' %>
<%= csrf_meta_tag %>
<%= active_scaffold_includes %>
...
<%= yield %>
...
</html>

and i ve a sample AS controller where i do :

class Admin::VideoController < ApplicationController
  layout "activescaffold"
  active_scaffold :videos do |config|
  end        
end


Any help will be greatly appreciated !

thank you,

Regards.

guillaume

unread,
Oct 3, 2011, 3:10:57 AM10/3/11
to actives...@googlegroups.com
Tu be more specific, the entire layout is sent back on pagination action or search action, and inside it i can see the RJS declaration :
"try { ActiveScaffold.replace_html(....".

Any idea ?

thx.

guillaume

unread,
Oct 3, 2011, 5:29:20 AM10/3/11
to actives...@googlegroups.com
Ok i found the problem !!
My layout was still named ".rhtml"... if i changed it to ".html.erb" then it works great !

kind of crazy...
Reply all
Reply to author
Forward
0 new messages