I have a question about `ActiveRecord.locking_column`.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

I have a question about `ActiveRecord.locking_column`.

UG Muscle

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🙏

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a440de65-5d70-42e9-b35b-2bd60d32b7cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.