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 8442493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:51:28+00:00 2026-06-10T08:51:28+00:00

This is my first project using Ruby on Rails and I’m working on the

  • 0

This is my first project using Ruby on Rails and I’m working on the front-end code; the back-end developer is new to rails too. One template includes the code render 'flashes', which is triggered when there is an error on a form submission; but the markup it generates is messed up, and I’d like to fix it. Here’s an example. The <!-- comments --> are mine:

<div id="flash">
    <div class="wrapper">
      <div title="Error" class="error"></div>  <!-- Empty div -->
        <p>Please enter a valid email</p>      <!-- p element sibling of div.error -->
      </div>                                   <!-- Closes div.wrapper -->
    </div>                                     <!-- Closes div#flash -->
</div>                                         <!-- Extra /div closes parent div -->

I would prefer to use one div for the message, but the biggest problem is the extra closing div tag at the end, which closes a parent division, messing up the layout.

I see that the error message is defined in the controller as flash[:error] = "Please enter a valid email", but I don’t know where rails is getting this bogus markup. Is there a _flashes partial I can edit to fix this problem? I’ve pored over the project’s filesystem, and it’s not clear to me where this markup lives.

  • 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-06-10T08:51:29+00:00Added an answer on June 10, 2026 at 8:51 am

    There is no _flashes.html.erb file in the Rails source. If you’re seeing

    render 'flashes'
    

    in your application, you or some generator you ran put it there. Look through the files in app/views/ for one called _flashes.html.erb that contains the markup you provided in your Question. Once you find that file you should be able to modify it however you need to fix your broken HTML issue.

    If you can’t find it there, look at your list of gems in your Gemfile, specifically for one that relates to theming/templating. It’s possilbe you’ve included a gem that contains this template file (though much less likely than the file existing in app/views/).

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

Sidebar

Related Questions

I'm brand new at Ruby. Trying to set up the first application/project using Aptana
I'm doing my first Ruby on Rails project. I am working on a project
I am working on ruby rails project. I am using Rails 2.3.4 and ruby
Newbie to ruby this is my first project I am using the FasterCSV Gem
I am doing my first project using Ruby on Rails and need to display
So this is my first real Ruby on Rails project. I've learned my lesson
This is my first rails project and its been a real pleasure working with
Imagine this as the code from build.xml: <project name=test project> <target name=first> <echo>first</echo> </target>
OK, I've been using sqlite3 as development successfully for this tiny rails 3.1 project,
First of all, I'm using Rails 3.1.1 and Ruby 1.9.3-p0 . After experimenting for

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.