Sha256: 5b0f1ceaa87ac22f7d1873e9cd90d7907f2143699328be0b3bef0ea193d440f1

Contents?: true

Size: 1.05 KB

Versions: 15

Compression:

Stored size: 1.05 KB

Contents

class Admin::PreferencesController < AdminController
  layout 'admin'

  def index
    @preferences = Preference.sys(_sid).all
  end

  def show
    @preference = Preference.find_sid_id(_sid, params[:id])
  end

  def new
    @preference = Preference.new
  end

  def create
    @preference = Preference.new(params[:preference])
    @preference.system_id = _sid

    if @preference.save
      redirect_to [:admin, @preference], :notice => "Successfully created preference."
    else
      render :action => 'new'
    end
  end

  def edit
    @preference = Preference.find_sid_id(_sid, params[:id])
  end

  def update
    @preference = Preference.find_sid_id(_sid, params[:id])
    if @preference.update_attributes(params[:preference])
      redirect_to [:admin, @preference], :notice  => "Successfully updated preference."
    else
      render :action => 'edit'
    end
  end

  def destroy
    @preference = Preference.find_sid_id(_sid,params[:id])
    @preference.destroy
    redirect_to admin_preferences_url, :notice => "Successfully destroyed preference."
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.20 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.19 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.18 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.17 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.16 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.15 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.14 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.13 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.11 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.10 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.9 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.8 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.7 app/controllers/admin/preferences_controller.rb
kit_cms-2.3.6 app/controllers/admin/preferences_controller.rb