Displaying 1 result from an estimated 1 matches for "handle_post".
Did you mean:
handler_post
2006 Oct 03
0
WebObjects-style Object Cache
...:
I have a model Page and every page has multiple page_parts. So,
there''s a form for editing a Page and all of it''s parts and when you
submit the form all of your changes are saved. There''s an action that
handles the post that saves the page and all the parts.
def handle_post
if request.post?
@page.attributes = params[:page]
parts_to_update = []
(params[:part] || {}).values.each do |v|
if part = @page.parts.find_by_name(v[:name])
part.attributes = part.attributes.merge(v)
parts_to_update << part...