Skip to content
Discussion options

You must be logged in to vote

The trick is the following:

@article.content.body.to_s

So the body wraps ActionText::Content or something which has all the data needed to render everything correctly and you just have to call .to_s at the end and it will render everything for you.

Super weird rails decision if you ask me but no one questions this as long as you stick with erb html rendering.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@joeldrapper
Comment options

@mhenrixon
Comment options

@joeldrapper
Comment options

@mhenrixon
Comment options

Answer selected by joeldrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants