Today I Learned

A Hashrocket project

Show Model and Grep with Pry-rails

This week Josh Branchaud wrote about show-models in Pry-rails:

http://til.hashrocket.com/posts/62f61ee06f-show-rails-models-with-pry

This method has two nice variants. show-model User shows you that model, useful in a large database.

show-models also accepts --grep for searching:

[1] pry(main)> show-models --grep published
Post
  id: integer
  title: string
  published_at: datetime # 'published' is highlighted
Looking for help? Hashrocket has been an industry leader in Ruby on Rails since 2008. Rails is a core skill for each developer at Hashrocket, and we'd love to take a look at your project. Contact us and find out how we can help you.