# Edit function now outputs HTML only

**URL:** <https://www.ruby-forum.com/t/edit-function-now-outputs-html-only/172312>\
**Category:** Rails\
**Created:** [July 19, 2009, 9:40am UTC](https://www.ruby-forum.com/t/edit-function-now-outputs-html-only/172312 "2009-07-19T09:40:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [July 19, 2009, 9:40am UTC](https://www.ruby-forum.com/t/edit-function-now-outputs-html-only/172312/1 "2009-07-19T09:40:55Z")

</div>

For some reason my new action works fine but my edit outputs nothing  
but raw HTML. Anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [July 19, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/edit-function-now-outputs-html-only/172312/2 "2009-07-19T16:15:48Z")

</div>

Chris H. wrote:

> For some reason my new action works fine but my edit outputs nothing  
> but raw HTML. Anyone have any ideas?

You’d normally want raw HTML output. What’s the problem?

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [July 19, 2009, 5:41pm UTC](https://www.ruby-forum.com/t/edit-function-now-outputs-html-only/172312/3 "2009-07-19T17:41:43Z")

</div>

To the screen? It is not interpreting the html, I get

# DATA
  
instead  
of a large header on the screen. I am using a partial for the new/edit  
and  
the new works fine.

On Sun, Jul 19, 2009 at 9:15 AM, Marnen Laibow-Koser \<

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [July 19, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/edit-function-now-outputs-html-only/172312/4 "2009-07-19T17:48:18Z")

</div>

Chris H. wrote:

> To the screen? It is not interpreting the html, I get
> 
> # DATA
>   
> instead  
> of a large header on the screen.

Oh, now I understand. It’s probably getting output with the wrong MIME  
type, so that the browser doesn’t know it’s HTML. Check the extensions  
on your view files.

If that’s not the issue, perhaps you’re escaping HTML somewhere in the  
view that you shouldn’t be. Use your browser’s View Source command to  
check.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
