lib/eav_hashes/eav_hash.rb
# Since entries are lazy-loaded, this is called just before an operation on an entry happens and
# loads the rows only once per EavHash lifetime.
Since entries are lazy-loaded, this is called just before an operation on an entry happens and
loads the rows only once per EavHash lifetime.
Since entries are lazy - loaded this is called just before an operation on an entry happens and loads the rows only once per EavHash lifetime .
def load_entries_if_needed
        if @entries.nil?
          @entries = {}
          rows_from_model = @owner.send("#{@options[:entry_assoc_name]}")
          rows_from_model.each do |row|
            @entries[row.key] = row
          end
        end
        @entries
      end
def load_entries_if_needed if @entries . nil? @entries = { } rows_from_model = @owner . send ( "#{@options[:entry_assoc_name]}" ) rows_from_model . each do | row | @entries [ row . key ] = row end end @entries end
Since entries are lazy-loaded, this is called just before an operation on an entry happens and
loads the rows only once per EavHash lifetime.
Since entries are lazy - loaded this is called just before an operation on an entry happens and loads the rows only once per EavHash lifetime .