Class: Locomotive::SitesController
Instance Method Summary
collapse
#current_site_public_url, #public_page_url
Instance Method Details
#create ⇒ Object
20
21
22
23
24
|
# File 'app/controllers/locomotive/sites_controller.rb', line 20
def create
authorize 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
authorize 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
authorize Site
@site = service.build_new
respond_with @site
end
|