We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Her doesn't setup dirty tracking on id or primary_key when a new model's initialized. This impacts the behavior of persisted? and new_record?
id
primary_key
persisted?
new_record?
Existing behavior
class User include Her::Model end user = User.new(id: 5) #=> #<User(users/5) id=5> user.new_record? #=> false user.persisted? #=> true user.changes #=> {}
Expected behavior
class User include Her::Model end user = User.new(id: 5) #=> #<User(users/5) id=5> user.new_record? #=> true user.persisted? #=> false user.changes #=> {"id"=>[nil, 5]}
See #298 for more background.
We may need to track an instance variable of @new_record similar to AR
@new_record
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Her doesn't setup dirty tracking on
id
orprimary_key
when a new model's initialized. This impacts the behavior ofpersisted?
andnew_record?
Existing behavior
Expected behavior
See #298 for more background.
We may need to track an instance variable of
@new_record
similar to ARThe text was updated successfully, but these errors were encountered: