Class: Admin::GeneralSettingsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/admin/general_settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#dismiss_alertObject



13
14
15
16
17
18
19
20
# File 'app/controllers/admin/general_settings_controller.rb', line 13

def dismiss_alert
  if request.xhr? and params[:alert_id]
    dismissed = Spree::Config[:dismissed_spree_alerts] || ''
    Spree::Config.set :dismissed_spree_alerts => dismissed.split(',').push(params[:alert_id]).join(',')
    filter_dismissed_alerts
    render :nothing => true
  end
end

#updateObject



3
4
5
6
7
8
9
10
11
# File 'app/controllers/admin/general_settings_controller.rb', line 3

def update
  Spree::Config.set(params[:preferences])

  respond_to do |format|
    format.html {
      redirect_to admin_general_settings_path
    }
  end
end