Class: Locomotive::SitesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::SitesController
- Defined in:
- app/controllers/locomotive/sites_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
20 21 22 23 24 |
# File 'app/controllers/locomotive/sites_controller.rb', line 20 def create Site @site = service.create(site_params) respond_with @site, location: -> { dashboard_path(@site) } end |
#index ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/locomotive/sites_controller.rb', line 8 def index Site @sites = service.list respond_with @sites end |
#new ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/locomotive/sites_controller.rb', line 14 def new Site @site = service.build_new respond_with @site end |