spree_comments
spree_comments copied to clipboard
Bugfix for Spree 3.7 on Rails 5
When creating a comment on Spree 3.7.0 and Rails 5.2.3, you will receive a :back method not found error from the location_after_save method in the admin/comments_controller.rb because :back was deprecated in Rails 5.
Changing the :back method to a more universal way of getting back to the last page (request.referrer) cleared up the issue. This should also work for previous versions of Rails before the :back method was deprecated.