1

In the rails console, we can prepend helper. to helpers to use them, like so:

helper.time_ago_in_words(Time.now - 60*60*2)

but this doesn't work in the server console during a pry-byebug debugging

How can I use a method like time_ago_in_words after starting debugging with binding.pry?

stevec
  • 41,291
  • 27
  • 223
  • 311

1 Answers1

0

To test helper into console or debugger(i'm not 100% sure) try with:

ApplicationController.helpers.time_ago_in_words(Time.now - 60*60*2)
Juanse Gimenez
  • 481
  • 4
  • 14