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:
parent
943fe31c2f
commit
2cc781e6a9
9
Rakefile
9
Rakefile
|
@ -26,11 +26,12 @@ end
|
||||||
|
|
||||||
desc "Open an irb session with Ransack and the sample data used in specs"
|
desc "Open an irb session with Ransack and the sample data used in specs"
|
||||||
task :console do
|
task :console do
|
||||||
require 'irb'
|
require 'rspec'
|
||||||
require 'irb/completion'
|
require File.expand_path('../spec/spec_helper.rb', __FILE__)
|
||||||
require 'console'
|
require File.expand_path('../spec/console.rb', __FILE__)
|
||||||
|
require File.expand_path('../spec/support/schema.rb', __FILE__)
|
||||||
ARGV.clear
|
ARGV.clear
|
||||||
IRB.start
|
Pry.start
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Open an irb session with Ransack, Mongoid and the sample data used in specs"
|
desc "Open an irb session with Ransack, Mongoid and the sample data used in specs"
|
||||||
|
|
Loading…
Reference in New Issue