Sha256: 0fa8b3f59b29b08ac0e68f4bd0be0ec37d30078f322ffe9c7b4c8df3c3856375

Contents?: true

Size: 1.08 KB

Versions: 8

Compression:

Stored size: 1.08 KB

Contents

class LogSubscribersController < ActionController::Base
  wrap_parameters :person, :include => :name, :format => :json

  class SpecialException < Exception
  end

  rescue_from SpecialException do
    head :status => 406
  end

  before_filter :redirector, :only => :never_executed

  def never_executed
  end

  def show
    render :nothing => true
  end

  def redirector
    redirect_to "http://foo.bar/"
  end

  def data_sender
    send_data "cool data", :filename => "file.txt"
  end

  def file_sender
    send_file File.expand_path(File.join("test","dummy","public","favicon.ico"))
  end

  def with_fragment_cache
    render :inline => "<%= cache('foo'){ 'bar' } %>"
  end

  def with_fragment_cache_and_percent_in_key
    render :inline => "<%= cache('foo%bar'){ 'Contains % sign in key' } %>"
  end

  def with_page_cache
    cache_page("Super soaker", "/index.html")
    render :nothing => true
  end

  def with_exception
    raise Exception
  end

  def with_rescued_exception
    raise SpecialException
  end

  def with_action_not_found
    raise AbstractController::ActionNotFound
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
rails-logstasher-0.1.4 test/dummy/app/controllers/log_subscriber_controller.rb
rails-logstasher-0.1.3 test/dummy/app/controllers/log_subscriber_controller.rb
rails-logstasher-0.1.2 test/dummy/app/controllers/log_subscriber_controller.rb
yarder-0.1.0 test/dummy/app/controllers/log_subscriber_controller.rb
rails-logstasher-0.1.1 test/dummy/app/controllers/log_subscriber_controller.rb
rails-logstasher-0.1.0 test/dummy/app/controllers/log_subscriber_controller.rb
yarder-0.0.2 test/dummy/app/controllers/log_subscriber_controller.rb
yarder-0.0.1 test/dummy/app/controllers/log_subscriber_controller.rb