I'm embedding another AS from another controller with an action link :
config.action_links.add "Agregar Sols", :action => "list", :controller =>
"disponibles",
:type => :member, :inline => true, :position => :after, :parameters =>
{:associations => "disponibles"}
however, it displays a lot of json garbage, like this:
try {
$("as_disponibles-content").update("<table cellpadding=\"0\"
cellspacing=\"0\">\n <thead>\n <tr>\n \n <th
id=\"as_disponibles-id-column\" class=\" \" title=\"\">\n <a
href=\"/disponibles/list?associations=disponibles&id=37&page=1&sort=id&sort_direction=ASC\"
onclick=\"addActiveScaffoldPageToHistory('/disponibles/list?associations=disponibles&id=37&page=1&sort=id&sort_direction=ASC',
'as_disponibles'); new
Ajax.Request('/disponibles/list?associations=disponibles&id=37&page=1&sort=id&sort_direction=ASC',
{asynchronous:true, evalScripts:true, method:'get',
onFailure:function(request){ActiveScaffold.report_500_response('as_disponibles-active-scaffold')},
onLoading:function(request){Element.addClassName('as_disponibles-id-column','loading');},
parameters:'authenticity_token=' +
encodeURIComponent('P5ZlH7hj+1Gq0lraHMvRmWqHTZ7wmPgpLkaVIi0iHHc=')}); return
false;\">Id</a>\n </th>\n <th id=\"as_disponibles-rut-column\"
class=\" \" title=\"\">\n
....and so on.
Looking at it, seems like it's missing an enclosing CDATA tag, within a
<script>, that's why it doesn't get that "try".
So, thing is, that in frontends/default/views/_list_inline_adapter.html.erb
at:
<%=payload %>
needs that enclosure
or in: lib/extensions/action_controller_rendering.rb
line: 9
:locals => {:payload => render_to_string(args.first, &block)},
that render_to_string is returning javascript with no script tag.
any help?
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.