Sha256: 9ccb3dc4dee545646fdb6f481e116daa557fa619ab1678aa8b3591bc7a1f09ba

Contents?: true

Size: 667 Bytes

Versions: 13

Compression:

Stored size: 667 Bytes

Contents

class Admin::SettingsController < Admin::BaseController
  respond_to :html, :js
  
  def index
    @search = Setting.search(params[:search])
    @settings = @search.page(params[:page] || 1)
  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

13 entries across 13 versions & 1 rubygems

Version Path
fullstack-cms-0.1.14 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.13 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.12 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.11 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.9 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.8 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.7 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.6 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.5 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.4 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.3 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.2 app/controllers/admin/settings_controller.rb
fullstack-cms-0.1.1 app/controllers/settings_controller.rb