has_many :events, :dependent => :destroy, :order => 'event_date DESC'
has_one :source, :class_name => 'SnapshotSource', :dependent => :destroy
+ has_many :violations, :class_name => 'RuleFailure'
has_many :async_measure_snapshots
has_many :async_measures, :through => :async_measure_snapshots
map.resources 'rules', :path_prefix => 'api', :controller => 'api/rules'
map.resources 'properties', :path_prefix => 'api', :controller => 'api/properties', :requirements => { :id => /.*/ }
+ map.connect 'browse/:id', :controller => 'browse', :action => 'index', :requirements => { :id => /.*/ }
# home page
map.home '', :controller => 'filters', :action => 'index'