Methods
Attributes
| [R] | entries |
Class Public methods
new() Link
Source: show
# File activerecord/lib/active_record/message_pack.rb, line 48 def initialize @entries = [] @refs = {}.compare_by_identity end
Instance Public methods
add_cached_associations(record, entry) Link
Source: show
# File activerecord/lib/active_record/message_pack.rb, line 81 def add_cached_associations(record, entry) record.class.reflections.each_value do |reflection| if record.association_cached?(reflection.name) entry << reflection.name << encode(record.association(reflection.name).target) end end end
build_entry(record) Link
Source: show
# File activerecord/lib/active_record/message_pack.rb, line 73 def build_entry(record) [ ActiveSupport::MessagePack::Extensions.dump_class(record.class), record.attributes_for_database, record.new_record? ] end