# Haml and textareas in custom extension

**URL:** <https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931>\
**Category:** Radiant CMS\
**Created:** [July 13, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931 "2008-07-13T17:58:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7bcc69/32.png) [@gert](https://www.ruby-forum.com/u/gert)\
**Post date:** [July 13, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931/1 "2008-07-13T17:58:45Z")

</div>

Hi and first - thank you for making radiant, I’ve used many many cms’es  
and this is by far the best I have used yet!

I have made a custom extension and created an admin area for the models  
where I have a problem with a textarea. I have never used Haml so my  
views are all html.erb files.

The problem is that the admin-area seems to parse my templates as haml  
files and thus adds spaces after each line break in my textareas.

Example output (less-than and greater-than replaced with {}:

{textarea class=“textarea” cols=“40” id=“collection\_body”  
name=“collection[body]” rows=“20”\>This is the best brand ever.

```
      Look how cool this text is.

      {a href="http://gert.dk"}gert.dk{/a}{/textarea}

```

Is there anyway to either use the find\_and\_preserve method in a html.erb  
view or turn off haml-parsing for my custom part of the admin area?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![gert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7bcc69/32.png) [@gert](https://www.ruby-forum.com/u/gert)\
**Post date:** [July 13, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931/2 "2008-07-13T20:32:59Z")

</div>

A couple weeks back I added the find\_and\_preserve to the admin layout,  
so it should handle any textareas you have added.

Sean

---

<div class="post-metadata">

**Author:** ![gert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7bcc69/32.png) [@gert](https://www.ruby-forum.com/u/gert)\
**Post date:** [July 13, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931/3 "2008-07-13T20:43:23Z")

</div>

I’m on Radiant 0.6.7 gem version - is there a newer version I’m not  
aware about?

And… Aha!! My controller is extending the ApplicationController, is  
there a radiant specific controller I should be extending instead?

---

<div class="post-metadata">

**Author:** ![gert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7bcc69/32.png) [@gert](https://www.ruby-forum.com/u/gert)\
**Post date:** [August 4, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931/4 "2008-08-04T18:23:02Z")

</div>

Hi,

just wanted to let everybody know that this is fixed in 0.6.9, maybe  
also in 0.6.8 but I skipped that version.

Thanks again.

---

<div class="post-metadata">

**Author:** ![gert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7bcc69/32.png) [@gert](https://www.ruby-forum.com/u/gert)\
**Post date:** [July 15, 2008, 12:47pm UTC](https://www.ruby-forum.com/t/haml-and-textareas-in-custom-extension/142931/5 "2008-07-15T12:47:12Z")

</div>

I have looked at the extension tutorial again and the controller there  
extends the ApplicationController like I do.

Any ideas about what I could try and look at?
