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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:49:20+00:00 2026-06-04T05:49:20+00:00

I have an error in my app. I have a nested from, which is

  • 0

I have an error in my app. I have a nested from, which is rendering perfectly in the new, but not in the page where I want to see the content of all users.
This is the error:

NoMethodError in Resumes#index

Showing /Users/antonella/Desktop/resumin/resume/app/views/resumes/index.html.erb where line #10 raised:

undefined method `educations' for nil:NilClass

Extracted source (around line #10):

7:          <%= resume.personal_detail.address %>
8:          <%= resume.personal_detail.telephone %>
9:      </li>
10:         <% @resume.educations.each do |education| %>
11:         <li>
12:             <%= resume.education.school_name %>
13:             <%= resume.education.city %>

Rails.root: /Users/antonella/Desktop/resumin/resume

resume.rb

class Resume < ActiveRecord::Base
    has_one :personal_detail
    has_many :educations, :dependent => :destroy
    accepts_nested_attributes_for :personal_detail
    attr_accessible :personal_detail_attributes 
    validates_associated :personal_detail 

    accepts_nested_attributes_for :educations, :reject_if => lambda { |a| a[:education].blank? }, :allow_destroy => true
    attr_accessible :education_attributes
    validates_associated :education
end

resumes_controller.rb

def index 
    @resumes = Resume.all
  end

education.rb

class Education &lsaquo; ActiveRecord::Base
    belongs_to :resume
    attr_accessible :school_name, :degree, :dates_attended, :type_of_study, :field_of_study, :city, :country
end

index.html

<h1>All resumes</h1>
<ul>
    <% @resumes.each do |resume| %>
        <li>
            <%= resume.personal_detail.firstname %>
            <%= resume.personal_detail.lastname %>
            <%= resume.personal_detail.address %>
            <%= resume.personal_detail.telephone %>
        </li>
        <% @resume.educations.each do |education| %>
        <li>
            <%= resume.education.school_name %>
            <%= resume.education.city %>
            <%= resume.education.country %>
            <%= resume.education.dates_attended %>
            <%= resume.education.degree %>
            <%= resume.education.type_of_study %>
            <%= resume.education.field_of_study %>
        </li>
        <% end %>
    <% end %>
</ul>
  • 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-04T05:49:21+00:00Added an answer on June 4, 2026 at 5:49 am

    Instead of:

    <% @resume.educations.each do |education| %>
    

    it should be:

    <% resume.educations.each do |education| %>
    

    Note that the variable @resume does not exist. You only have @resumes and inside the loop you have resume.

    You also have to change this part:

    <li>
      <%= resume.education.school_name %>
      <%= resume.education.city %>
      <%= resume.education.country %>
      <%= resume.education.dates_attended %>
      <%= resume.education.degree %>
      <%= resume.education.type_of_study %>
      <%= resume.education.field_of_study %>
    </li>
    

    To:

    <li>
      <%= education.school_name %>
      <%= education.city %>
      <%= education.country %>
      <%= education.dates_attended %>
      <%= education.degree %>
      <%= education.type_of_study %>
      <%= education.field_of_study %>
    </li>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use wcsncasecmp inside c/c++ app. Compile have following error: error: 'wcsncasecmp' was not
I have a Sinatra app, that uses omniauth which constantantly gets this error attack
I have been given an app written by someone else and the error I
I actually have two questions regarding exception/error handling in the iPhone app that I
I have done simple java app for blackberry, while building am getting following error.
Possible Duplicate: Error loading Active Record gem with sinatra app using RVM I have
This is probably a setting error somewhere. I have a django app that works
I have an app which was facing recurring server errors when on M/S datastore
Have error ValueError: time data '2012-03-15 9:45:00 AM' does not match format '%Y-%m-%d %H:%M:%S'
I develop RoR app and i met thing which i can't solve. 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.