Sha256: f33019b5d6a39d1ec68288bc8ca0e516870ab5e2b067f164556b5c96fa25dab5

Contents?: true

Size: 633 Bytes

Versions: 7

Compression:

Stored size: 633 Bytes

Contents

class Admin::SettingsController < Admin::BaseController
  respond_to :html, :js
  
  def index
    @skip_filter = true
    @settings = Setting.order("key")
  end

  def new
    @setting = Setting.new  
  end
  
  def edit
  end
  
  def create
      @setting = Setting.new(params[:setting])
      
      if @setting.respond_to?(:author)
        @setting.author ||= current_user
      end
      
      @setting.save
      respond_with(@setting)
  end

  def update
    @setting.attributes = params[:setting]
    @setting.save
    respond_with(@setting)
  end

  def destroy
    @setting.destroy
    respond_with(@setting)
  end
end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fullstack-cms-0.2.5 app/controllers/admin/settings_controller.rb
fullstack-cms-0.2.4 app/controllers/admin/settings_controller.rb
fullstack-cms-0.2.3 app/controllers/admin/settings_controller.rb
fullstack-cms-0.2.2 app/controllers/admin/settings_controller.rb
fullstack-cms-0.2.1 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.17 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.15 app/controllers/admin/settings_controller.rb