Sha256: b987bffd097c07f3663d765cbac512ba65c4ab0b257a0e77ea5cff578424cad2

Contents?: true

Size: 664 Bytes

Versions: 15

Compression:

Stored size: 664 Bytes

Contents

module Locomotive
  class CurrentSiteMetafieldsController < BaseController

    account_required & within_site

    localized

    before_action :load_site

    helper Locomotive::SitesHelper

    def index
      authorize @site
      respond_with(@site)
    end

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

    private

    def load_site
      @site = current_site
    end

    def service
      @service ||= Locomotive::SiteMetafieldsService.new(current_site, current_locomotive_account)
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.2.0.alpha1 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.1.1 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.1.0 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.1.0.rc1 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.3 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.2 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.1 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.0 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.0.rc0 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.0.alpha3 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-3.4.1 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.0.alpha2 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-4.0.0.alpha1 app/controllers/locomotive/current_site_metafields_controller.rb
locomotivecms-3.4.0 app/controllers/locomotive/current_site_metafields_controller.rb