On Jueves, 29 de Julio de 2010 09:37:05 Hernan Astudillo escribió:
> :format => :html worked fine, but it includes the whole layout, and it
>
> didn't work with :layout => false as parameter. Any workaround?

I tried it with master branch and it didn't include layout, which branch are 
you using?

>
> i don't use nested because i'm using it also, but with another controller
> with very different config. And as far as i know, you can only nest 1
> controller to each associated model, right? maybe i could use another
> relation for that... but conditions depends on record data and
> current_user, and current_user can't... wait, it can be used in model.
> maybe it could work, i'll try that
>
> thanks Sergio
>
> On Thu, Jul 29, 2010 at 2:52 AM, Sergio Cambra .:: entreCables S.L. ::. <
>
> [email protected]> wrote:
> > On Jueves, 29 de Julio de 2010 04:18:20 Hernan Astudillo escribió:
> > > 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"}
> >
> > Why don't you use config.nested.add_link?
> > Anyway, try to add :format => :html in :parameters key.
> >
> > > 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&amp;id=37&amp;page=1&am
> >p;
> >
> > >sort=id&amp;sort_direction=ASC\"
> >
> > onclick=\"addActiveScaffoldPageToHistory('/disponibles/list?associations=
> >di
> >
> > >sponibles&amp;id=37&amp;page=1&amp;sort=id&amp;sort_direction=ASC',
> > > 'as_disponibles'); new
> >
> > Ajax.Request('/disponibles/list?associations=disponibles&amp;id=37&amp;pa
> >ge
> >
> > >=1&amp;sort=id&amp;sort_direction=ASC', {asynchronous:true,
> > > evalScripts:true, method:'get',
> >
> > onFailure:function(request){ActiveScaffold.report_500_response('as_dispon
> >ib
> >
> > >les-active-scaffold')},
> >
> > onLoading:function(request){Element.addClassName('as_disponibles-id-colum
> >n'
> >
> > >,'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?
> >
> > --
> > Sergio Cambra .:: entreCables S.L. ::.
> > Mariana Pineda 23, 50.018 Zaragoza
> > T) 902 021 404 F) 976 52 98 07 E) [email protected]
> >
> > --
> > 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]<activescaffold%2Bunsubscribe@
> >googlegroups.com> .
> > For more options, visit this group at
> > http://groups.google.com/group/activescaffold?hl=en.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
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.

Reply via email to