Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Simple Ruby on Rails Application Frontend Development Introducing Views

Destroy only works locally using link_to, substituted button_to for deployment. Any potential issues?

Had issues deploying the app on Heroku, eventually ended up substituting "link_to" with "button_to" because that was the only way I could find to make it destroy statuses (it otherwise just ignored the request and displayed all statuses, worked perfectly locally though). From what I read it may be related to the version (running Ruby 2.2.2 Rails 4.1.8). It now doesn't display any confirmation notice but it does at least delete items.

Anyone have other suggestions? Am I messing anything else up by using button_to? Already tried precompiling, javascript_include_tag 'jquery_ujs', changing the gemfile.

FYI to anyone else having issues with destroy, button_to works as a last resort...

Ram Iyer
Ram Iyer
9,116 Points

I too am experiencing the same issue. Can't figure out the reason.