search for: render_contact

Displaying 1 result from an estimated 1 matches for "render_contact".

2006 Feb 14
22
Teaching Models to Render Themselves in the Controller
...AJAX call. So, I simply render the partial from my controller. Not too bad, as long as I can keep straight what partial to call and what locals I need to pass where. However, to make things a little easier on myself, I can create a helper method in the controller like this: helper_method :render_contact def render_contact(contact) render_partial(''contact_view'', :contact => my_contact) end I can now call this same function from my view to render the page initially, and from my controller to render new contacts for AJAX calls. The next step is where I''ve run into t...