Class: ProductionSitesPage

Inherits:
RecordProxyPage
  • Object
show all
Defined in:
lib/models/production_sites_page.rb

Instance Method Summary collapse

Instance Method Details

#all_recordsObject



8
9
10
# File 'lib/models/production_sites_page.rb', line 8

def all_records
  Site.all.reject {|site| site.name == 'yodel'}
end

#construct_recordObject



12
13
14
# File 'lib/models/production_sites_page.rb', line 12

def construct_record
  Site.new
end

#find_record(id) ⇒ Object

record proxy pages deal with site models (site.model_name). Override the methods it uses to interact with these models we can edit Sites (a non site model)



4
5
6
# File 'lib/models/production_sites_page.rb', line 4

def find_record(id)
  Site.find(id)
end