Displaying 5 results from an estimated 5 matches for "partial_upd".
2008 May 15
0
partial_updates feature in rails 2.1, failing to save because of validate_presence _of on other attributes in the table
I am trying to use the new partial_updates feature in rails 2.1,
http://dev.rubyonrails.org/changeset/9157
but it is failing by trying to use all validations in the model
instead of just the changed attributes. The model works as I can
successfully .save(false) but if I try a regular .save I get an error
saying that it could not save b...
2008 Jul 07
0
ActiveRecord in Rails 2.1.0 misbehaving for Aggregate Attr.
...me.
In a nutshell: If you change an aggregate object attribute created via
composed_of method (see Agile Web Development - Second Edition Chapter
17 page 313 onwards) and then save the model, the change to the model
(composite attribute specifically) will not be saved UNLESS you
explicitly set the partial_updates attribute for that model to false.
N
Specific use-case:
I have an Account model that shadows the accounts table in database.
This account object contains a composite object (amongst others) called
BillingAddress defined within the Account model class as follows:
composed_of :billing_address...
2008 Apr 21
7
undefined method `partial_updates='
Hello
When I try the command:
rake db:migrate
I get the following:
rello@calimero:~/Sites/music_library/config$ rake db:migrate
(in /home/rello/Sites/music_library)
rake aborted!
undefined method `partial_updates='' for ActiveRecord::Base:Class
I googled with no results.
Anybody can help me?
Thankyou
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk...
2008 Jun 03
1
Rails 2.1 and default setting of Partial updates
...nd just needs to be edited: "Note: There''s
currently a config/initializers/new_rails_defaults.rb file that has this
setting, so edit that file if you have it."
However, in the new_rails_defaults.rb file in my new empty project does
not have that setting in it (ActiveRecord::Base.partial_updates = ...)
Yeah, I can add it, but I thought it should already be in there?
Thanks,
jt
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group...
2009 Aug 15
4
Isn't there any performance issue when saving serialized attributes every time?
In edge rails, serialized attributes are saved every time no matter
they are changed or not:
def update_with_dirty
if partial_updates?
# Serialized attributes should always be written in case
they''ve been
# changed in place.
update_without_dirty(changed | (attributes.keys &
self.class.serialized_attributes.keys))
else
update_without_dirty
end...