This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/js/reload_content.js.erb

8 lines
325 B
Plaintext
Raw Normal View History

var to_render = '';
<% if value %>
to_render = "<%= escape_javascript(render(:partial => partial, :object => value, :locals => locals)) %>"
<% elsif values %>
to_render = "<%= escape_javascript(render(:partial => partial, :collection => values, :locals => locals)) %>"
<% end %>
$("#<%= id %>").<%= function %>(to_render);