> On May 4, 2017, at 6:02 PM, fugee ohu <[email protected]> wrote:
> 
> Debug helpers/statements go in views or controllers or can  be used in either?



You can generally use debuggers anywhere in Ruby code. (most of the community 
prefers byebug I think, but I can't speak for everyone. I know some who still 
use pry).

In your views, sometimes I stick a debugging statement in just inside the 
markup, like so (assuming your view is ERB):

<% byebug %>


The only exceptions to that might be a cached partial, which won't get 
re-evaluated. To work around such a problem, remove the caching or clear the 
Rails cache. 

-Jason


----

Jason Fleetwood-Boldt
[email protected]
http://www.jasonfleetwoodboldt.com/writing

If you'd like to reply by encrypted email you can find my public key on 
jasonfleetwoodboldt.com <http://jasonfleetwoodboldt.com/> (more about setting 
GPG: https://gpgtools.org) 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/197B6328-9F54-4577-BE7D-17C24B46B1C7%40datatravels.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to