class Message::DataSource

Public Instance Methods

findbyid(id, policy) click to toggle source
Calls superclass method Diva::Model::Memory#findbyid
# File core/message.rb, line 687
def findbyid(id, policy)
  if id.is_a? Enumerable
    super.map do |v|
      case v
      when Message
        v
      else
        findbyid(v) end end
  else
    result = super
    if result
      result
    elsif policy == Diva::DataSource::USE_ALL
      result = Service.primary.scan(:status_show, id: id)
      result end end
rescue Exception => err
  error err
  raise err
end