Sha256: fd35da96f961356e5dbc55f982a02feb32fd0a7365362e6dc105fde73f419718

Contents?: true

Size: 546 Bytes

Versions: 11

Compression:

Stored size: 546 Bytes

Contents

class Admin::LayoutController < Admin::AbstractModelController
  model_class Layout
  
  attr_accessor :cache
  
  only_allow_access_to :index, :new, :edit, :remove,
    :when => [:developer, :admin],
    :denied_url => { :controller => 'page', :action => 'index' },
    :denied_message => 'You must have developer privileges to perform this action.'

  def initialize
    super
    @cache = ResponseCache.instance
  end
  
  def save
    saved = super
    model.pages.each { |page| @cache.expire_response(page.url) } if saved
    saved
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
radiant-0.6.1 app/controllers/admin/layout_controller.rb
radiant-0.6.0 app/controllers/admin/layout_controller.rb
radiant-0.6.2 app/controllers/admin/layout_controller.rb
radiant-0.6.3 app/controllers/admin/layout_controller.rb
radiant-0.6.5.1 app/controllers/admin/layout_controller.rb
radiant-0.6.4 app/controllers/admin/layout_controller.rb
radiant-0.6.5 app/controllers/admin/layout_controller.rb
radiant-0.6.7 app/controllers/admin/layout_controller.rb
radiant-0.6.6 app/controllers/admin/layout_controller.rb
radiant-0.6.8 app/controllers/admin/layout_controller.rb
radiant-0.6.9 app/controllers/admin/layout_controller.rb