Monday, January 6, 2014

[Rails] Re: Problems testing a destroy failure

Walter - thanks for getting back to me on this.

First of all, I should have made this more clear - the delete action is
in the controller, not the model and the @payment_info model object is
using the destroy method.

To me, this method seems to be as straight forward as possible - you
attempt to destroy a verified active record object and if the destroy is
successful, then redirect to the the new action, if it fails display the
error and redirect to the edit method. I don't see a logic problem
anywhere in this method so I'm not a big fan of trying to change the
method just to satisfy testing.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f44747b8a43b50ff9f0e7c93287f60cc%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate