Ruby on Rails
Sunday, June 10, 2018
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment