From 6041ec4188a429ff2dfdb622730a8d40a3c2a01f Mon Sep 17 00:00:00 2001 From: Zhomart Mukhamejanov Date: Sun, 2 Nov 2014 11:14:12 -0800 Subject: [PATCH] Added task rake mongoid_console --- Rakefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index cc76efa..9d533d6 100644 --- a/Rakefile +++ b/Rakefile @@ -28,4 +28,16 @@ task :console do require 'console' ARGV.clear IRB.start -end \ No newline at end of file +end + +desc "Open an irb session with Ransack, Mongoid and the sample data used in specs" +task :mongoid_console do + require 'irb' + require 'irb/completion' + require 'pry' + require 'mongoid' + require File.expand_path('../lib/ransack.rb', __FILE__) + require File.expand_path('../spec/mongoid/support/schema.rb', __FILE__) + ARGV.clear + Pry.start +end