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

  • SEARCH
  • Home
  • 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 3698292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:57:49+00:00 2026-05-19T04:57:49+00:00

I have a quite average form in Rails, trough blog_kit <% form_for(@blog_post, :html =>

  • 0

I have a quite average form in Rails, trough blog_kit

<% form_for(@blog_post, :html => { :multipart => true }) do |f| %>\
  ... other code
  <%= f.text_area :body %>
  <%= debug(@blog_post) %>

When editing a blog-post, the body suddenly contains additional spaces (marked as _ to visualise):

...sit amet eleifend diam imperdiet pharetra.
__ 
__## FOO?
__Morbi nec

Because a textarea is space-aware, it will show the spaces. On update, they are added to the database.

These spaces are not in the database (before the erronous update mentioned above, that is). Nor does the model BlogPost.find(1) contain these spaces.

script/console » b = BlogPost.find(1)
» puts b.body
...sit amet eleifend diam imperdiet pharetra.

## FOO?
Morbi nec

It appears some logic adds the spaces, after fetching the the database, but before rendering in the form partial.
Candidates are:

  • BlueCloth. I have that enabled, but cannot find a place where it would hook into the load process, and alter the body before it is rendered in the textarea
  • HAML. The _form.html.rb partial is not (yet) migrated to _form.haml, so I assume haml stays away from this piece. But it might be part of the trouble?

I do not know where to start looking, so any hints would be very welcome.

  • 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-19T04:57:49+00:00Added an answer on May 19, 2026 at 4:57 am

    This is a HAML issue. See http://haml-lang.com/docs/yardoc/file.FAQ.html#q-preserve

    In my case my form was not yet converted to HAML (like you) but I had the application.html.haml converted. It seems that HAML does some indenting even to partials that are not in HAML format.

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

Sidebar

Related Questions

I have quite big document in html format that generated from Microsoft Word. It
I have quite a lot of C++ legacy code modules from my colleagues, unfortunately
We have quite a bit of reusable code at work (a good thing). Whenever
I have quite a large list of words in a txt file and I'm
I have quite a few RewriteRules in my .htaccess that looks like this RewriteRule
I have quite a problem concerning the use of relational database concepts in Delphi
I have quite a large VB6 project, with many forms, classes, modules and user
I have quite a lot of music files but their title attributes have the
I have quite a few situations where I have database structures similar to: TABLE
I have quite a large table with 19 000 000 records, and I have

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.