Make Ransack's `rake console` great again

- make it work again 🍾

- and have it load the Ransack test data 🍰

Please let me know if this can be improved :)

TODO: same thing for `rake mongoid_console`.
This commit is contained in:
Jon Atack 2016-07-24 03:34:59 +02:00
parent 943fe31c2f
commit 2cc781e6a9
1 changed files with 5 additions and 4 deletions

View File

@ -26,11 +26,12 @@ end
desc "Open an irb session with Ransack and the sample data used in specs"
task :console do
require 'irb'
require 'irb/completion'
require 'console'
require 'rspec'
require File.expand_path('../spec/spec_helper.rb', __FILE__)
require File.expand_path('../spec/console.rb', __FILE__)
require File.expand_path('../spec/support/schema.rb', __FILE__)
ARGV.clear
IRB.start
Pry.start
end
desc "Open an irb session with Ransack, Mongoid and the sample data used in specs"