search for: serialized_attributes

Displaying 6 results from an estimated 6 matches for "serialized_attributes".

2009 Aug 15
4
Isn't there any performance issue when saving serialized attributes every time?
...ery 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 end In out app, User model has a serialized attribute friend_ids, which is the id array of the user''s friends (used to be a friendships table, but when that table grew to tens of millions of records, we refactore...
2008 Oct 21
6
detecting width overflow in serialized column with mysql
So I''ve got an ActiveRecord model pointing to a MySQL db, with an auto-serialized column ("serialize :columnName"). Thing is, MySQL, depending on how it''s configured (like, by default), has a bad habit of just truncating your data if it''s too wide for the column, with no error raised. Yeah, I can probably reconfigure MySQL and/or my AR connection to it. But
2011 Oct 06
5
Simple ActiveRecord serialise problem
...-3.1.0/lib/active_support/whiny_nil.rb:48:in `method_missing'' from /Users/andy/Code/FakePlatform/vendor/gems/Darwin/gems/json-1.4.6/lib/json/common.rb:286:in `load'' from /Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/base.rb:1938:in `block in set_serialized_attributes'' Does anyone have any ideas how to fix this? It should work (it''s such a simple case). Cheers, Andy -- 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-/JYP...
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to 2.2.2. I am almost there but I have hit a problem with ActiveRecord. Before the upgrade, the following code was working fine. def create_root(administrator) root = create_root_collection(self.pingee_name, administrator,
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2008 Aug 27
11
find_by_sql and xml_serializer problems
Hi, I''m doing a find_by_sql and am getting an odd error when trying to render the result to xml. The find is: children_list = find_by_sql("SELECT components.componentid, components.logicalname, versions.level, versions.branch, versions.sequence FROM components, versions where components.componentid = ''" + component_id + "''" + " AND