# How to render a Key Text

**URL:** <https://community.prismic.io/t/how-to-render-a-key-text/131>\
**Category:** Developing with Prismic\
**Tags:** ruby\
**Created:** [April 10, 2020, 1:33pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131 "2020-04-10T13:33:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdellatif.issegue](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@abdellatif.issegue](https://community.prismic.io/u/abdellatif.issegue)\
**Post date:** [April 10, 2020, 1:33pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/1 "2020-04-10T13:33:02Z")

</div>

Hi,

I use Prismic with Ruby and I dont know how to render a Key Text field?

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [April 10, 2020, 1:39pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/2 "2020-04-10T13:39:51Z")

</div>

Hi Abdellatif,

Rendering the key text field should be quite straight forward. It should be like so:

# \<%= @document[“blog-post.title”].as\_text %\>

You can also see how to do so from this article.  
[https://prismic.io/docs/ruby/templating/key-text](https://prismic.io/docs/ruby/templating/key-text)

---

<div class="post-metadata">

**Author:** ![abdellatif.issegue](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@abdellatif.issegue](https://community.prismic.io/u/abdellatif.issegue)\
**Post date:** [April 10, 2020, 1:53pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/3 "2020-04-10T13:53:53Z")

</div>

I use html.slim when I intergeted this code it show me directly the same ligne of code on my page in the navigator!

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [April 10, 2020, 1:58pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/4 "2020-04-10T13:58:38Z")

</div>

What result are you getting?

---

<div class="post-metadata">

**Author:** ![abdellatif.issegue](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@abdellatif.issegue](https://community.prismic.io/u/abdellatif.issegue)\
**Post date:** [April 10, 2020, 2:00pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/5 "2020-04-10T14:00:54Z")

</div>

\<%= @document[“unsubscribe.email”].as\_text %\>

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [April 10, 2020, 2:35pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/6 "2020-04-10T14:35:28Z")

</div>

I had a look at your api response and it seems you are returning a rich text field in the api response.

Can you show me the full code for the partial?

---

<div class="post-metadata">

**Author:** ![abdellatif.issegue](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@abdellatif.issegue](https://community.prismic.io/u/abdellatif.issegue)\
**Post date:** [April 10, 2020, 2:40pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/7 "2020-04-10T14:40:45Z")

</div>

actually, I chang it just know to test another thing!

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/1X/c1255c9282695a112930f38c3ea2f81348883f16.png)

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [September 22, 2020, 4:03pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/9 "2020-09-22T16:03:35Z")

</div>

closed on September 22, 2020, 4:03pm UTC, flag & select 'Something Else' to reopen.



---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:42pm UTC](https://community.prismic.io/t/how-to-render-a-key-text/131/10 "2021-12-09T17:42:33Z")

</div>

Opened on December 9, 2021, 5:42pm UTC


