Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

"render :js => '...' " cannot working

#5624

the response donnt include "application/javascript"

Reported by dil · September 13th, 2010 @ 03:42 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • Importance changed from to Low

    Could you please elaborate on the issue?

    What steps should I follow to reproduce this?

    September 14th, 2010 @ 05:28 AM

  2. Santiago Pastorino
    Santiago Pastorino

    Can you provide some failing test case, patch or at least a failing application.
    Thank you

    September 14th, 2010 @ 06:27 AM

  3. dil
    dil

    thanks
    this problem is my error.
    in controller i write:
    respond_to do |format|

    format.html { render :js => "...." }
    

    end in client js i send a ajax request with "dataType: 'script'", so the response header include "Content-Type text/html; charset=utf-8", i wanna get script content type, so ...

    Now, I change "format.html" to "format.js", the problem is ok.

    September 15th, 2010 @ 02:32 AM

  4. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to invalid

    September 15th, 2010 @ 05:28 AM