11
Make your rails console awesome —— Rails console pro tips Bruce Li toyroom.bruceli.net @ascendbruce

Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Embed Size (px)

Citation preview

Page 1: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Make your rails console awesome—— Rails console pro tips

Bruce Li toyroom.bruceli.net @ascendbruce

Page 2: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Live DemoDanger

Page 3: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

awesome_rails_console

• gem "awesome_rails_console"

• bundle install

• rails generate awesome_rails_console:install

Page 4: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)
Page 5: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Save typing with ~/.pryrc

class Dev def self.me User.find_by_email( "[email protected]" ) end end

Page 6: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Debugging with byebug• binding.pry

• next

• step

• continue

• caller / wtf?

• break N

• break --disable-all

• exit-program

Page 7: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

conclusion

Page 8: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

awesome_rails_console

install

todayAwesome

Page 9: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

We are hiring

Page 10: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Feedback welcome!

tweet with #rubysg or@ascendbruce

Page 11: Make your Rails console AWESOME (Ruby SG meetup 2016-03-29)

Questions?

@ascendbrucetoyroom.bruceli.netawesome_rails_console

Search this gem by the way