how to write message in console from ruby controller, when method is called with AJAX call?
<p>I want to print message in console from Ruby Controller . and I am using AJAX call for calling method(action). I have already tried following ways to print data:</p>
<ol>
<li><p>Rails.logger.debug(&quot;debug::&quot; + person.name)</p>
</li>
<li><p>puts &quot;test&quot;</p>
</li>
<li><p>logger.info(&quot;session info&quot; + session.inspect)</p>
</li>
<li><p>logger.debug &quot;test&quot;</p>
</li>
<li><p>render :text =&gt; @some_object.inspect</p>
<p>render can not we used as i got error message that it is already used for rendering a file.</p>
</li>
</ol>