Lets say I have i variable var witch is a pointer to another variable named user_id.
How do I puts var such that I can see in the console user_id = (whatever the value is)
Reason why I want to do this, is because I want to write a method called print_debug_block, where you give it an array of variables, and it prints in the following format:
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
var1 = valOfVar1
var2 = valOfVar2
var3 = valOfVar3
etc
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logger.debug()
outputs to the log.
See http://guides.rubyonrails.org/debugging_rails_applications.html#the-logger
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.