Class: RemotesPage
- Inherits:
-
RecordProxyPage
- Object
- RecordProxyPage
- RemotesPage
- Defined in:
- lib/models/remotes_page.rb
Instance Method Summary collapse
- #form_for_new_record(options = {}, &block) ⇒ Object
- #new_record ⇒ Object
-
#record ⇒ Object
record proxy pages deal with site models (site.model_name).
- #records ⇒ Object
Instance Method Details
#form_for_new_record(options = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/models/remotes_page.rb', line 16 def form_for_new_record(={}, &block) form_for(Remote.new, , &block) end |
#new_record ⇒ Object
12 13 14 |
# File 'lib/models/remotes_page.rb', line 12 def new_record Remote.new end |
#record ⇒ Object
record proxy pages deal with site models (site.model_name). Override the methods it uses to interact with these models we can edit Remotes (a non site model)
4 5 6 |
# File 'lib/models/remotes_page.rb', line 4 def record @record ||= Remote.find(BSON::ObjectId.from_string(params['id'])) end |
#records ⇒ Object
8 9 10 |
# File 'lib/models/remotes_page.rb', line 8 def records @records ||= Remote.all end |