Sha256: 3ac60e362e961a885492167dc9c1cb412c40bb706cfb54ed9b1b11d019d04bec

Contents?: true

Size: 838 Bytes

Versions: 3

Compression:

Stored size: 838 Bytes

Contents

class HomeController < ApplicationController
  def index
    @users = User.all

    Rollbar.debug("Test message from controller with no data")
    Rollbar.debug("Test message from controller with extra data",
                  :foo => "bar", :num_users => @users.length)
  end

  def report_exception
    begin
      foo = bar
    rescue => e
      Rollbar.error(e)
    end
  end

  def deprecated_report_exception
    begin
      foo = bar
    rescue => e
      Rollbar.error(e)
    end
    render :json => {}
  end

  def cause_exception
    foo = bar
  end

  def file_upload
    this = will_crash
  end

  def current_user
    @current_user ||= User.find_by_id(cookies[:session_id])
  end

  def custom_current_user
    user = User.new
    user.id = 123
    user.username = 'test'
    user.email = 'email@test.com'
    user
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rollbar-2.2.1 spec/dummyapp/app/controllers/home_controller.rb
rollbar-2.2.0 spec/dummyapp/app/controllers/home_controller.rb
rollbar-2.1.2 spec/dummyapp/app/controllers/home_controller.rb