Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Saving model with no validations through associations. #39

Open
mbiczysko opened this issue Jun 21, 2010 · 0 comments
Open

Saving model with no validations through associations. #39

mbiczysko opened this issue Jun 21, 2010 · 0 comments

Comments

@mbiczysko
Copy link

Thanks for a great work. I run into small problem.
I'm not sure is it a feature or issue. For example:

t = Task.find 1
t.name = "new name"
t.save(false) # no validations
t.versions.last.changes
{"name" => [old name , new name]}

Works fine without any problems, but if I do through associations

Project
has_many :tasks

Project.tasks.last.attributes= {:id => 1 , :name = "new old name" }
Project.save(false)
Project.tasks.last.versions.last.changes
{"name" => [old name , new name]}

This wont work, Task model will be updated through associations, but version will remain the same it won't add a new one.

Thanks for Help

Marek

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant