Sha256: ddaee80353ccbe0ddd64775569d5f8de52f1aeb8e14a330147e1a04d1a042251

Contents?: true

Size: 682 Bytes

Versions: 34

Compression:

Stored size: 682 Bytes

Contents

class SbdevCoreController < InheritedResources::Base
  protect_from_forgery

  respond_to :html

  before_filter :authenticate_admin!, :except => [:show, :index]
  before_filter :get_index, :only => [:index]

  layout "application"

  def index
    index!(:layout => !request.xhr?)
  end

  def show
    show!(:layout => !request.xhr?)
  end

  def new
    new!(:layout => !request.xhr?)
  end

  def create
    create!{ request.referer }
  end

  def edit
    edit!(:layout => !request.xhr?)
  end

  def update
    update!{ request.referer }
  end

  def destroy
    destroy!{ request.referer }
  end

  private

  def get_index
    @index = Index.find(controller_name)
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
sbdevcore-0.3.10 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.9 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.8 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.7 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.6 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.5 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.4 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.3 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.2 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.1 app/controllers/sbdev_core_controller.rb
sbdevcore-0.3.0 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.26 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.25 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.24 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.23 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.22 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.21 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.20 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.19 app/controllers/sbdev_core_controller.rb
sbdevcore-0.2.18 app/controllers/sbdev_core_controller.rb