Displaying 2 results from an estimated 2 matches for "partial_fil".
Did you mean:
partial_file
2006 Apr 05
1
New AJAX function: remote_replace_with_partial() <-- write less code
...ication.rb file:
def partial_handler
string = render_to_string :partial => params[:partial]
render :inline => string
end
javascript code: (this can be placed in a JS file or in your template)
<%= javascript_tag "function update_page_element(element_id,
controller ,partial_file, params)
{
new Ajax.Updater(element_id, ''/'' + controller + ''/partial_handler?
partial='' + partial_file + params, {asynchronous:true,
evalScripts:true}); return false;
} " %>
View code:
<%= remote_replace_with_partial(''change me ajax'...
2010 Jul 15
2
Can partials be accessed from two views?
For me to keep my application DRY i need to be able to have partials
that can be accessed from two views. How is would I go about doing this?
Many thanks,
jakx12
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to