In my Post model class, I'm trying to debug the following code:
after_create :transcode_video, :if => "is_video? && !Rails.env.development?"
def is_video?
return false unless post_link
link_extension = post_link.downcase.split(".").last
VIDEO_FORMATS.include? link_extension
end
I want to output a debug string to check the value of is_video
.
I tried adding
after_create logger.debug "#{is_video}"
and
after_create logger.debug "#{is_video?}"
but get a routing error in each case. I also tried using "puts" instead of logger.