Class: Locomotive::CurrentSiteMetafieldsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/locomotive/current_site_metafields_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


12
13
14
15
# File 'app/controllers/locomotive/current_site_metafields_controller.rb', line 12

def index
  authorize @site
  respond_with(@site)
end

#update_allObject


17
18
19
20
21
# File 'app/controllers/locomotive/current_site_metafields_controller.rb', line 17

def update_all
  authorize @site, :update?
  service.update_all(params[:site][:metafields])
  respond_with @site, location: -> { current_site_metafields_path(current_site) }
end