Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6531133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:50:27+00:00 2026-05-25T09:50:27+00:00

I guess I’m looking to add some CMS type functionality to my web app.

  • 0

I guess I’m looking to add some CMS type functionality to my web app. In it’s simplest form I will create some content, store it, and then call it in a view.

I have an “article” model with art_name and art_content string fields.
in some “Pages” controller I store a variable of the particular article I would like displayed on a page as:

@article_wanted = article.find(5).art_content

In a view I call this variable <%= @article_wanted %>and the string in the art_content of the appropriate model (ID 5 in this example) is output. This is great… however I would like to store html as my art_content string so I can add h1 tags, css classes,…etc. By using my current methodology the art_content string is displayed on the browser as it was saved (tags visible) <h1>article content header</h1>. I think that because I’ve defined the model field as a string the tags are converted:
&lt;h1&gt;art content header&lt;/h1&gt;

How do I get around this?

is there a better way to publish articles to a page that is better than my current method? where I’m calling a controller variable, from an html content field of some model, in a view?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:50:28+00:00Added an answer on May 25, 2026 at 9:50 am

    This doesn’t really address the question of wanting full CMS functionality (google “rails cms”), but did you try <%= raw @article_wanted %>?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I guess if it is possible, that it will be some crazy convoluted way,
I guess the real question is: If I don't care about dirty reads, will
I guess I have been using the Web Site model ever since .NET 2.0
Guess people need some experience with Linq-to-xml and knowledge of the build of a
I guess the question is really about how to define a type as an
Guess you have a class with some c-tors: public Foo(int i, String s); public
I guess, type variance annotations ( + and - ) cannot be applied to
I guess I have two questions actually: One: How do I create folders with
I guess everyone has already heard the news about some key developers leaving the
My guess is that class variables (class var) are truly global in storage (that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.