<%= render :template => 'js/get_to_render', :locals => {:value => value, :values => values, :partial => partial, :locals => locals} %>
$("#<%= id %>").<%= function %>(to_render);