Skip to content

Instantly share code, notes, and snippets.

@movstox
Forked from joshuapinter/irb.rb
Created November 4, 2020 17:37
Show Gist options
  • Select an option

  • Save movstox/8bb593443e5729725505e06b7b67bea7 to your computer and use it in GitHub Desktop.

Select an option

Save movstox/8bb593443e5729725505e06b7b67bea7 to your computer and use it in GitHub Desktop.

Revisions

  1. @joshuapinter joshuapinter renamed this gist Mar 16, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @joshuapinter joshuapinter created this gist Mar 16, 2015.
    9 changes: 9 additions & 0 deletions console
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    if defined?(ActiveRecord::Base) && defined?(Authlogic)
    controller = ApplicationController.new
    require 'action_controller/test_case'
    controller.instance_variable_set(:@_request, ActionController::TestRequest.new)
    controller.instance_variable_set(:@_response, ActionController::TestResponse.new)
    Authlogic::Session::Base.controller = Authlogic::ControllerAdapters::RailsAdapter.new(controller)
    end

    UserSession.new( User.first )