We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

tonic on 05/27/08


Tagged

header rails type content rails2


Versions (?)


Header content type in rails 2


Published in: Rails 


  1. before_filter :header_javascript
  2.  
  3. def header_javascript
  4. response.headers['Content-type'] = 'text/javascript; charset=utf-8'
  5. end

Report this snippet 

You need to login to post a comment.