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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:37:34+00:00 2026-06-12T15:37:34+00:00

I think this is a very simple problem and I could be just going

  • 0

I think this is a very simple problem and I could be just going about it incorrectly because I am new to rails, but here it goes……

What I want to do is render the results of my partial view in my application layout using a yield. I have a search bar at the top of my page that I want the results to display in the yield in the layout. Again, I’m not sure if this is the proper way to do this, so if it isn’t, just let me know the best way.

Right now, I get a “Missing template events/search” error when I try and use the search on my page. If I add the following code to controller it gets all of the information properly, but doesn’t render in the application layout, it just displays the partial:

render :partial => "events/search_results"

Here is what the relevant section controller looks like:

layout "application"

def search
  @events = Event.search params[:search]
end

Here is the application layout (Please excuse the formatting, I tried to make it easily readable):

 <!DOCTYPE html>
 <html lang="en">
 <head>
   <title>XXXXXXX</title>
   <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"type="text/javascript"></script> <![endif]-->
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body>
    <div class="navbar navbar-top">
   <div class="navbar-inner">
    <div class="container">
             <%= render :partial => "events/search" %>
    </div>
   </div>
   </div>

<div class="container-fluid">
    <div class="row-fluid">
            <div class="span1">
            </br>
                <div class="well well-small">
                    <center><h3>Filters</h3></center> </br>
                    <%= render :partial => "events/left_severity_filter" %>
                    <%= render :partial => "events/left_date_filter" %>
                </div>
            </div>

        <div class="span8">
                         <%= yield %>
                    </div>
        <div class="span3">
                         <%= render :partial => "events/right_filter" %
        </div>
    </div>
</div>

Any help would be much appreciated. 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-06-12T15:37:36+00:00Added an answer on June 12, 2026 at 3:37 pm

    You do not have the events/search.html.erb template in the views. Create this view template and it will be displayed where the yield is.

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

Sidebar

Related Questions

this question is about style, because i think this is a very common problem
This problem is very simple, but I just can't figure it out added to
I think this could be a very easy question for you. But I have
This should be a very simple problem you would think. I have a box
I'm hoping this question has a very simple answer. I can think of ways
I am sure there is a very simple answer to this question, I think
I'm going a little mad I think. This is the VERY first thing I
Just wondering if anyone could help me with this. I'm new to actionscript, and
Did ask a question about the same problem here: Silly problem with UTF8 but
I'm asking for your help for i think a simple problem but i didn't

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.