Class: DevelopmentSitesPage

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

Constant Summary collapse

REMOTE_NAME =
'yodel'

Instance Method Summary collapse

Instance Method Details

#recordObject

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)



6
7
8
# File 'lib/models/development_sites_page.rb', line 6

def record
  @record ||= Site.find(BSON::ObjectId.from_string(params['id']))
end

#recordsObject



10
11
12
# File 'lib/models/development_sites_page.rb', line 10

def records
  @records ||= Site.all
end