Sha256: c847aa27d3246b5c05f514ff67bd3f6cbeca6e83871c88c3f1845664fd70f7da
Contents?: true
Size: 628 Bytes
Versions: 9
Compression:
Stored size: 628 Bytes
Contents
# frozen_string_literal: true class Spree::Admin::ReviewSettingsController < Spree::Admin::BaseController before_action :process_unset_checkboxes, only: [:update] def update Spree::Reviews::Config.set(params[:preferences]) respond_to do |format| format.html do redirect_to edit_admin_review_settings_path end end end def process_unset_checkboxes # workaround for unset checkbox behaviour params[:preferences] ||= {} Spree::ReviewsConfiguration.boolean_preferences.each do |sym| params[:preferences][sym] = false if params[:preferences][sym].blank? end end end
Version data entries
9 entries across 9 versions & 1 rubygems