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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:09:14+00:00 2026-06-15T13:09:14+00:00

I have a home page HomeController this loads the home view which has some

  • 0

I have a home page HomeController this loads the home view which has some header content and other html at the top of the page. I also have a storyBoard below all that content on the page, then some other home page html content. Now the storyboard has a model view controller also. My question is how would I get my view to load into that storyboard area on the home page. Would I need to communicate from my HomeController to my StoryBoard controller to place the StoryBoard view into the home view area for where storyboard is meant to show.

I’m not sure how to go about setting up the relationships between the two.

UPDATED WITH CODE.

This code it just really the scaffolding code generated by rails. Hopefuly this will help make clear what I’m trying to do. I just want to be able to render my storyboard into the home view storyboard div tag.

HomeController

class HomeController < ApplicationController
  def index
  end

end

Home view

<body>
<div id="description">
    <div id="info">
        <p class="title">Sed ut perspiciatis unde omnis</p>
        <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo</p>
    </div>
</div>
<div id="soryboard">
  // add story board view here
</div>
<div id="section2">
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo</p>
</div>

</body>

StoryBoard Controller

class StoryboardsController < ApplicationController
  # GET /storyboards
  # GET /storyboards.json
  def index
    @storyboards = Storyboard.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @storyboards }
    end
  end

  # GET /storyboards/1
  # GET /storyboards/1.json
  def show
    @storyboard = Storyboard.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @storyboard }
    end
  end

  # GET /storyboards/new
  # GET /storyboards/new.json
  def new
    @storyboard = Storyboard.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @storyboard }
    end
  end

  # GET /storyboards/1/edit
  def edit
    @storyboard = Storyboard.find(params[:id])
  end

  # POST /storyboards
  # POST /storyboards.json
  def create
    @storyboard = Storyboard.new(params[:storyboard])

    respond_to do |format|
      if @storyboard.save
        format.html { redirect_to @storyboard, notice: 'Storyboard was successfully created.' }
        format.json { render json: @storyboard, status: :created, location: @storyboard }
      else
        format.html { render action: "new" }
        format.json { render json: @storyboard.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /storyboards/1
  # PUT /storyboards/1.json
  def update
    @storyboard = Storyboard.find(params[:id])

    respond_to do |format|
      if @storyboard.update_attributes(params[:storyboard])
        format.html { redirect_to @storyboard, notice: 'Storyboard was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @storyboard.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /storyboards/1
  # DELETE /storyboards/1.json
  def destroy
    @storyboard = Storyboard.find(params[:id])
    @storyboard.destroy

    respond_to do |format|
      format.html { redirect_to storyboards_url }
      format.json { head :no_content }
    end
  end
end

StoryBoard view

<h1>Listing storyboard</h1>

<table>
  <tr>
    <th>Image url</th>
    <th>Title</th>
    <th>Description</th>
    <th>Category</th>
    <th>Link</th>
    <th>Width</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @storyboards.each do |storyboard| %>
  <tr>
    <td><%= storyboard.image_url %></td>
    <td><%= storyboard.title %></td>
    <td><%= storyboard.description %></td>
    <td><%= storyboard.category %></td>
    <td><%= storyboard.link %></td>
    <td><%= storyboard.width %></td>
    <td><%= link_to 'Show', storyboard %></td>
    <td><%= link_to 'Edit', edit_storyboard_path(storyboard) %></td>
    <td><%= link_to 'Destroy', storyboard, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Storyboard', new_storyboard_path %>
  • 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-15T13:09:16+00:00Added an answer on June 15, 2026 at 1:09 pm

    #render in Rails allows you render any template:

    # home/index.html.erb
    # ...
    <div id="soryboard">
     <%= render :template => "storyboard/index" %>
    </div>
    # ...
    

    However you must make sure that all data used in that template is also available in the
    HomeController action.


    In addition you might want make more use of the application layout file if you havent already. Because thats usually the place where things like the header and the footer go
    A typical application layout:

    <!DOCTYPE html>
    <html>
    <head>
      <title>Title</title>
      <%= csrf_meta_tag %>
    </head>
    <body id="<%= params[:controller].gsub("/","_")+"_"+params[:action] %>">
      <div id="wrapper">
        <div id="header">
        </div>
    
        <!-- renders the corresponding template -->
        <%= yield %> 
    
        <div id="footer"> 
          <small>&copy; <%= Time.now.year %></small>
        </div>    
      </div>    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application built using JSF1.2. I have a home page which has
I have this simple MVC 3 application which simply has two controllers(Home and Edit),
I have a simple controller that goes to a view under views/mobile/home/index.html.haml It works
I have a home page with ul li div the div is a square
On my home page i have roughly 10 grids that sit inside ajax tabs
I have an ASP.NET home page where user provides his login ID. Depending on
I have a link button control on my home page side bar nav. When
I have one wordpress blog whose home page is showing a list of 10
I have modified a slider script to mimic ebay's slider on home page. I
I have built a site in wordpress and the home page is really screwed

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.