On 29 Mar 2011, at 19:37, "Alexey M." <[email protected]> wrote:

> Hello,
> i am playing with some test application in console: creating a model,
> saving it, changing its id, trying to save it again, changing the id
> back, saving again, etc.
> The results are sometimes unexpected, but maybe i just do not understand
> how/when the records are saved.
> 
> Can anybody please tell me if calling the "save" method saves the model
> immediately?

It will, as long as validations passed and at least some attributes have 
changed. Changing the id could conceivably cause odd things. 

Fred
> If not, what is the method to save it immediately?
> 
> I keep an Sqlite database browser open (a Firefox extension), and it
> seems that some "save" calls have no effect, but after changing some
> attributes, the "save" works again.
> I wonder if it is because of my messing around with id, or just the data
> base does not get updated immediately.
> 
> Thanks.
> 
> -- 
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to