在导轨模态中渲染部分

我在模态窗口中渲染部分时遇到问题。 我用简单模态和原型窗口尝试过它。 我基本上试图在模态弹出窗口中渲染部分内容。 这是现在的样子:

 'groups/show')+"); win.showCenter(); ")%> 

我已经尝试了多种组合,如何放置escape_javascript位以及在简单模式中尝试这个。

任何帮助将非常感激。

我认为更容易渲染页面上的部分(隐藏),然后在按下按钮时使用setContent将其捕获到窗口中。 这意味着你可以把更多的j放在页面之外,这也会更好一些。

在视图中:

  <%= link_to_function("Share This!", "show_group_popup()") %> 

在application.js(或其他包含的js文件)中:

 function show_group_popup() { $('groups_show').show(); win = new Window({title: "Share This", width:200, height:150, destroyOnClose: true, recenterAuto:false}); win.setContent('groups_show',true,true); win.show(); }