Sha256: 0f06b4edc1da9a09cb19e230c4b570cd6a7b248cf0e83b212b55c65752ac69d8

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

class <%= controller_name.camelize %>Controller < ApplicationController
  include  Trackman::Scaffold::ContentSaver
  after_filter :save_filters if Rails.env.development?
  after_filter :render_filters
  
  # ContentSaver defines two class methods for filtering the ouput of your pages
  #
  # Note that it uses nokogiri to parse the output.
  # You can call the methods multiples times if you need, it will stack the calls.
  
  # edit selector, &block 
  # pass a css or xpath selector and a block that will get executed for each result 
  
  # ie:
  # edit "//link[contains(@src 'http://127.0.0.1:3000'))" do |node|
  #   node['src'] = "http://www.production.com"
  # end

  # remove selector[, &predicate]
  # pass a css or xpath selector. You can also pass an optional predicate 
  # to refine the scan instead of trying to make the perfect selector.
  
  # ie:
  # remove 'script' do |node|
  #   node['src'].include?('/assets') && !node['src'].include?('application')
  # end

  def not_found
  end

  def error
  end
  
  def maintenance
  end
  
  def maintenance_error
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trackman-0.6.5 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.4 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.3 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.2 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.1 lib/generators/controller/templates/controller_layout.rb.erb