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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:23:18+00:00 2026-06-01T01:23:18+00:00

In my rails view(index.html.erb), i have following structure <div> <%= render :partial => create

  • 0

In my rails view(index.html.erb), i have following structure

<div>
   <%= render :partial => "create" %>
</div>

<div>
   <%= render :partial => "show" %>
</div>

In controller’s create action if i use

def create 
  render :update do |page|
     page.replace_html 'show', :partial => 'show'
  end
end

I get below error

undefined method `map' for nil:NilClass

because the instance variable doesnt get initialized from controller

If i use

def create
    render :file => "_show.erb"
end

I get template missing error. because the base layout file is not getting rendered.

I basically want to update the partial on create event.

Any suggestions would be of great help.

The solution :layout => false works.

But, newly added entry doesnt come until page refresh

 @entry = Model.find(:all) 

in the _show.html.erb doesnt get updated

  • 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-01T01:23:19+00:00Added an answer on June 1, 2026 at 1:23 am

    You can try like this it will surely works…………..

       def create
         render :partial => "show" ,:layout => false
       end
    

    but your page should be name like

    _show.html.erb
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Warning: Clueless Rails Newbie!) In my show.html.erb for my albums view, I call a
I have a controller named store_controller.rb and method index that renders index.html.erb , displaying
A rails newbie here I have 2 actions in my controller 1) index 2)
How to make it work? I have a file index.html.haml and a index.html.erb. the
I have Rails 3 application (running Rails RC1), and I have the following controller:
Can rails handle creating a view without a controller? For example, let say I
I have an XML view in a rails app, and need to insert in
Within the scope of a Rails controller or a view: How can I query
this time it's about Ruby On Rails. I have a form in the view
I'm making a simple search form in rails. In my search view 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.