"wrong number of arguments" in ajax_update_response.
Reported by Tomoaki Hayasaka | November 27th, 2010 @ 09:51 PM | in Hobo 1.3 (Rails 3)
1.3.0.pre22
"ajax_update_response
" calls
"controller_action_from_page_path
" with an argument
(page_path
) but
"controller_action_from_page_path
" is defined as
zero-arg method.
Fix (I'm assuming "ajax_update_response
" is not a
part of public API):
diff --git a/hobo/lib/hobo/controller.rb b/hobo/lib/hobo/controller.rb
index bd838ea..c32aa53 100644
--- a/hobo/lib/hobo/controller.rb
+++ b/hobo/lib/hobo/controller.rb
@@ -58,10 +58,9 @@ module Hobo
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
@@ -69,15 +68,13 @@ module Hobo
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;"
--
Comments and changes to this ticket
-
Domizio Demichelis November 28th, 2010 @ 01:21 PM
- State changed from new to open
- Milestone set to Hobo 1.3 (Rails 3)
- Assigned user set to Domizio Demichelis
- Milestone order changed from 197924 to 0
good catch! I missed to complete the cleanup of the page_path refactory. Thank you!
-
Domizio Demichelis November 28th, 2010 @ 03:03 PM
- State changed from open to resolved
(from [db52dba47475b93fcb67a9507963b1297c4c7a2d]) fix for missed page_path cleanup (credit Tomoaky Hayasaka) [#876 state:resolved] https://github.com/tablatom/hobo/commit/db52dba47475b93fcb67a950796...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
- 876 "wrong number of arguments" in ajax_update_response. (from [db52dba47475b93fcb67a9507963b1297c4c7a2d]) fix for...