Fred, example [1] was meant to be a minimal example.
I am more concerned about a situation when the same record is accessed
by two applications or through two objects.
I said that my question was philosophical (which does not mean that such
behavior is not a bug).
I understand why SQL executes "successfully", but if .save is only meant
as a shortcut to a specific SQL, it should have been called differently,
and in fact it should have been simply replaced by two methods: .insert
and .update, which would return "true" if the SQL executed successfully,
and there i wouldn't have been surprised.
The way it is, .save seems to hang awkwardly halfway between pure SQL
(but not quite there because it verifies if the object has been saved
before, which in many situation can be redundant, as the developer might
know this in advance) and something more intelligent that would return
"true" only if the object has been saved.
Any more comments, or should i try to submit a bug report?
Alexey.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment