Sha256: 4ab7facc800842cce35f677cd607db48c02230305bc2f6155db7591b37816014

Contents?: true

Size: 803 Bytes

Versions: 8

Compression:

Stored size: 803 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.report_exception(e)
    end
    render :json => {}
  end


  def cause_exception
    foo = bar
  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

8 entries across 8 versions & 1 rubygems

Version Path
rollbar-1.2.7 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.6 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.5 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.4 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.3 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.2 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.1 spec/dummyapp/app/controllers/home_controller.rb
rollbar-1.2.0 spec/dummyapp/app/controllers/home_controller.rb