Skip to content

Commit

Permalink
Make Ransack's rake console great again
Browse files Browse the repository at this point in the history
- 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`.
  • Loading branch information
jonatack committed Jul 24, 2016
1 parent 943fe31 commit 2cc781e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

1 comment on commit 2cc781e

@jonatack
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified with f2e85ad.

Please sign in to comment.