Others plugins integration problems

3 views
Skip to first unread message

mamooth

unread,
Mar 13, 2009, 10:56:41 AM3/13/09
to make_resourceful
Hi all,

I'm encountering some problems with using make_resourceful with rspec
and rubyamf. Here's the main two problems I have ;

1. First with rspec :
All the default rspec generated controller's specs are failing on
destroy action :

ActionController::RedirectBackError in 'CategoriesController
responding to DELETE destroy should destroy the requested category'
No HTTP_REFERER was set in the request to this action, so
redirect_to :back could not be called successfully. If this is a test,
make sure to specify request.env["HTTP_REFERER"].
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/responses.rb:48:in `set_default_redirect'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/responses.rb:116:in `included'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `instance_eval'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `scope'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:25:in `response_for'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/actions.rb:96:in `destroy'
./spec/controllers/categories_controller_spec.rb:158:

2. With rubyamf :

Before installing rubyamf, I had only 3 broken specs (those due to the
problem 1). But after the plug ins installation, I've had 36 broken
specs, all with the same kind of problem :

ArgumentError in 'CustomersController responding to PUT udpate with
invalid params should expose the customer as @customer'
wrong number of arguments (2 for 1)
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/responses.rb:100:in `included'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `instance_eval'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `scope'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:25:in `response_for'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/actions.rb:68:in `update'
./spec/controllers/customers_controller_spec.rb:129:


I'm not a rails killer, but I've spent several hours in a debugging
session. I really can't figure out how those errors are occurring. Is
someone could enlighten me ?

Thanks,
Mam

Hampton

unread,
Mar 13, 2009, 12:24:00 PM3/13/09
to make_res...@googlegroups.com
Well, the first one is easy.

I'm pretty sure the error says exaclty what the problem is. Its calling "redirect_to :Back" and you don't
have an HTTP_REFFERRER to redirect back *to*.

-hampton.
Reply all
Reply to author
Forward
0 new messages