Sha256: 6950b1bc7ca7794852e88feca7f76da01ff6d4b89b11da65a2fdc4c0c08c8b6d

Contents?: true

Size: 530 Bytes

Versions: 4

Compression:

Stored size: 530 Bytes

Contents

class SettingsController < ApplicationController
  
  before_filter :authenticate
  before_filter :authenticate_with_admin
  
  def show
    @setting = Setting.first
    switch_to_admin_layout
  end
  
  def edit
    @setting = Setting.first
    switch_to_admin_layout
  end
  
  def update
    @setting = Setting.first
    if @setting.update_attributes(params[:setting])
      redirect_to @setting, notice: t('settings.update.notice')
    else
      render action: "edit", warning: t('settings.update.warning')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tkh_admin_panel-0.9 app/controllers/settings_controller.rb
tkh_admin_panel-0.3.5 app/controllers/settings_controller.rb
tkh_admin_panel-0.3.2 app/controllers/settings_controller.rb
tkh_admin_panel-0.3.1 app/controllers/settings_controller.rb