Suppose the User model defines a column like this and does not have lock_version
class DeviseCreateUsers < ActiveRecord::Migration[5.1]
def change
create_table :users do |t|
t.string :name
# do not have a lock_version and other optimistic locks
end
end
end
When executing User.locking_column, I thought that I would return nil because This Model does not have locking_column, but return “locking_column”.
Would you like to submit a PR that returns nil if there is no problem?
Thanks to read🙏