SQLite3 Error - cannot rollback - no transaction is active

后端 未结 3 1693
离开以前
离开以前 2020-12-20 17:52

SOLVED (see below)

When I\'m trying to create or destroy a record (running on SQLite3) in my Ruby on Rails app (or in console as well) I\'m getting an SQL Exceptio

3条回答
  •  时光取名叫无心
    2020-12-20 18:20

    It is a good idea to never to make an instance method named "hash". This is used by a ton of ruby objects for comparison and equality. No matter weather your using SQLite, or anything, a custom hash method should only be done when you know what you want from it's results. In this case ActiveRecord made the method for you. I would rename the column :)

提交回复
热议问题