crazy: some JS event doesn't work if active_scaffold_includes is called from another layout #182

Closed
deneuxa opened this Issue Sep 6, 2011 · 3 comments

2 participants

@deneuxa

If a use a basic
<%=active_scaffold_includes%>
in application layout, everything is working...

BUT I wanted to load AS content only in the admin layout for better performance. So I did this:

controller Admin:

class Admin::AdminController < ApplicationController
  layout 'admin'

Layout Admin:

<% content_for :other_stylesheets_and_js do %>
  <%= active_scaffold_includes %>
  <%= stylesheet_link_tag 'admin'%>
<% end %>
<%= render :file => 'layouts/application' %>

and layout Application:

<%= javascript_include_tag :defaults %>
<%= yield :other_stylesheets_and_js %>

But using this configuration made some AS actions not working:
for search and sort columns, the loader appear, but the list isn't refreshed. When I reload the page, then the list appear filtered or sorted.

@vhochstein
Owner

Which rails version do you use?
Do you use prototype or jquery?

@deneuxa

Oups excuse the lack of precisions:
Rails 3.0.9 & JQuery

@vhochstein
Owner

jquery does not use activescaffold_includes, please take a look at an example app generated by one_step_activescaffold to see necessary includes for jquery

@deneuxa deneuxa closed this Dec 6, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment