The best way to search the source code for all gems for a project

I get a warning on my console that I would like to resolve. The problem is that I'm not sure which stone triggers this warning. What is the best way to search by source for all gems for a particular project.

thank

+4
source share
2 answers

I usually do the following:

cd `bundle show rails` # Go to the directory having rails gem content
cd ..                  # Go one level up to the folder having all gems
grep -ir escape_javascript *  # search for the required text in all files
> actionview-4.1.6/lib/action_view/helpers/javascript_helper.rb:      def escape_javascript(javascript)
> actionview-4.1.6/lib/action_view/helpers/javascript_helper.rb:      alias_method :j, :escape_javascript

EDIT : answer below jrochkind is the correct answer; my answer is incorrect as it scans all the gems installed in the system.

+3
source

, , , , .

, , root:

grep -r "escape_javascript" $(bundle show --paths) .

. , . , .

http://hectorcorrea.com/blog/bundle-grep-and-rails-applications/68

+8

All Articles