Class: Pageflow::ExternalLinks::SitesController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Pageflow::ExternalLinks::SitesController
- Defined in:
- app/controllers/pageflow/external_links/sites_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 |
# File 'app/controllers/pageflow/external_links/sites_controller.rb', line 12 def create @entry = Entry.find(params[:entry_id]) site = Site.all_for_revision(@entry.draft).create!(site_params) respond_with(site) end |
#destroy ⇒ Object
26 27 28 29 30 31 |
# File 'app/controllers/pageflow/external_links/sites_controller.rb', line 26 def destroy site = Site.find(params[:id]) site.destroy respond_with(site) end |
#index ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/pageflow/external_links/sites_controller.rb', line 6 def index @entry = Entry.find(params[:entry_id]) respond_with(Site.all_for_revision(@entry.draft)) end |
#update ⇒ Object
19 20 21 22 23 24 |
# File 'app/controllers/pageflow/external_links/sites_controller.rb', line 19 def update site = Site.find(params[:id]) site.update(site_params) respond_with(site) end |