Sha256: 0fe45d76e99e6272b309ca300910b24f255cfb37cba3b3fa574e84c152ed1f02

Contents?: true

Size: 1.04 KB

Versions: 13

Compression:

Stored size: 1.04 KB

Contents

class <%= controller_name.camelize %>Controller < ApplicationController
  include  Trackman::Scaffold::ContentSaver
  after_filter :render_content if Rails.env.development?
  
  # 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

13 entries across 13 versions & 1 rubygems

Version Path
trackman-0.6.18 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.17 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.16 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.15 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.14 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.13 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.12 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.11 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.10 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.9 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.8 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.7 lib/generators/controller/templates/controller_layout.rb.erb
trackman-0.6.6 lib/generators/controller/templates/controller_layout.rb.erb