Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit 823a688

Browse files
committed
add mongoid console to Rakefile
1 parent 83cc2a5 commit 823a688

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Rakefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,16 @@ end
1111
task :default do
1212
Rake::Task["mongoid"].invoke
1313
end
14+
15+
16+
desc "Open an irb session with Ransack, Mongoid and the sample data used in specs"
17+
task :mongoid_console do
18+
require 'irb'
19+
require 'irb/completion'
20+
require 'pry'
21+
require 'mongoid'
22+
require File.expand_path('../lib/ransack.rb', __FILE__)
23+
require File.expand_path('../spec/mongoid/support/schema.rb', __FILE__)
24+
ARGV.clear
25+
Pry.start
26+
end

0 commit comments

Comments
 (0)