Class: DiagramCache

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/diagram_cache.rb

Class Method Summary collapse

Class Method Details

.find_for_session(id, session_id) ⇒ Object



7
8
9
10
11
12
13
14
# File 'app/models/diagram_cache.rb', line 7

def self.find_for_session(id, session_id)
  dc = DiagramCache.find_by_id(id)
  if dc && dc.diagram_cache_sessions.find(:first, :conditions => ["session=?",session_id])
    return dc
  else
    return nil
  end
end