Bryan Corey
2006-May-18 23:42 UTC
[Rails] HABTM destroy works in console, not in web browser.
In console I can set image = Image.find(id) and then do image.destroy and it works fine. It even cleans up the HABTM relationships thanks to a before_destroy method. The problem is though that when I try and do the same thing in my web browser, either in my view or via the URL scheme of /controller/destroy/id it gives me a "stack level too deep" error. Anybody know why it would work flawlessly in console, but not work via my destroy action? I tried removing all code from my destroy action in the controller so that it was just the find, and then the destroy method but still get the error. Thanks ahead of time. -- Posted via http://www.ruby-forum.com/.