Sha256: fbbba60f76fedae50d2d06917363356c7329edd3642b1df0d78bf3bc5f3252c0

Contents?: true

Size: 943 Bytes

Versions: 15

Compression:

Stored size: 943 Bytes

Contents

class Admin::NoticesController < AdminController
  def index
    @notices = Notice.sys(_sid).all
  end

  def show
    @notice = Notice.find_sys_id(_sid, params[:id])
  end

  def new
    @notice = Notice.new
  end

  def create
    @notice = Notice.new(params[:notice])
    @notice.system_id = _sid
    if @notice.save
      redirect_to [:admin, @notice], :notice => "Successfully created Notice"
    else
      render :action => 'new'
    end
  end

  def edit
    @notice = Notice.find_sys_id(_sid, params[:id])
  end

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

  def destroy
    @notice = Notice.find_sys_id(_sid, params[:id])
    @notice.destroy
    redirect_to admin_notices_url, :notice => "Successfully deleted Notice"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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