Skip to content

Commit

Permalink
fix for missed page_path cleanup (credit Tomoaky Hayasaka) [#876 stat…
Browse files Browse the repository at this point in the history
…e:resolved]
  • Loading branch information
ddnexus committed Nov 28, 2010
1 parent f1c11d9 commit db52dba
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions hobo/lib/hobo/controller.rb
Expand Up @@ -58,26 +58,23 @@ def redirect_to_with_object_url(destination, *args)

def hobo_ajax_response(*args)
results = args.extract_options!
page_path = params[:page_path]
r = params[:render]
if r
ajax_update_response(page_path, r.values, results)
ajax_update_response(r.values, results)
true
else
false
end
end


def ajax_update_response(page_path, render_specs, results={})
if page_path
controller, action = controller_action_from_page_path(page_path)
identifier = view_context.view_paths.find( action,
controller,
false,
view_context.lookup_context.instance_variable_get('@details')).identifier
renderer = Dryml.page_renderer(view_context, identifier, [], controller)
end
def ajax_update_response(render_specs, results={})
controller, action = controller_action_from_page_path
identifier = view_context.view_paths.find( action,
controller,
false,
view_context.lookup_context.instance_variable_get('@details')).identifier
renderer = Dryml.page_renderer(view_context, identifier, [], controller)

render :update do |page|
page << "var _update = typeof Hobo == 'undefined' ? Element.update : Hobo.updateElement;"
Expand Down

0 comments on commit db52dba

Please sign in to comment.