method

add_cached_associations

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: Encoder
add_cached_associations(record, entry) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.