Class: ProductionSitesPage
- Inherits:
-
RecordProxyPage
- Object
- RecordProxyPage
- ProductionSitesPage
- Defined in:
- lib/models/production_sites_page.rb
Instance Method Summary collapse
- #all_records ⇒ Object
- #construct_record ⇒ Object
-
#find_record(id) ⇒ Object
record proxy pages deal with site models (site.model_name).
Instance Method Details
#all_records ⇒ Object
8 9 10 |
# File 'lib/models/production_sites_page.rb', line 8 def all_records Site.all.reject {|site| site.name == 'yodel'} end |
#construct_record ⇒ Object
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 |