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

  • Home
  • SEARCH
  • 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 4082644
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:12:47+00:00 2026-05-20T18:12:47+00:00

i am following this simple tutorial and i followed all the steps… but the

  • 0

i am following this simple tutorial and i followed all the steps… but the browser simply doesn’t show me anything i put inside the fields_for tag.

<%= form_for :activity, :url => activities_path do |f| %>

    <% if @activity.errors.any? %>
      <div id="error_explanation">
        <h2><%= pluralize(@activity.errors.count, "error") %> prohibited this activity from being saved:</h2>

        <ul>
        <% @activity.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
        </ul>
      </div>
    <% end %>

  <div class="field">
    <%= f.label "Foto" %><br />
    <%= f.text_field :photo %>
  </div>
  <div class="field">
    <%= f.label "Foto per la home" %><br />
    <%= f.text_field :photoHome %>
  </div>

    <% for info in @activity.infos %>

    This is rendered<br>

      <% fields_for "activity[info_attributes][]", info do |info_form| %>

    This is not rendered<br>

        <p>
          Titolo: <%= info_form.text_field :title %>
        </p>
        <p>
          Descrizione: <%= info_form.text_field :description %>
        </p>
      <% end %>
    <% end %>
    <p><%= submit_tag "Create activity" %></p>

<% end %>

The above code result is this:

enter image description here

What am i missing?

  • 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-05-20T18:12:48+00:00Added an answer on May 20, 2026 at 6:12 pm

    Rails is sometimes (well ok, often) a bit confusing in which helpers want a <% vs which helpers want <%=. Try

    <%= fields_for "activity[info_attributes][]", info do |info_form| %>
    

    The tutorial you’re following doesn’t, but that’s from 2007, and in Rails 3 this was changed. Current documentation on fields_for is here.

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

Sidebar

Related Questions

I'm following this tutorial to add a simple jquery tooltip. The tutorial uses three
I am learning castle.windsor following the tutorial online. this is the simple sample code:
I'm doing this simple tutorial on the following website: http://www.phpeasystep.com/phptu/6.html Is the code that
I'm following this tutorial for building a simple OpenGl application in C++ using QT.
I am creating simple reports module by following this tutorial .When i try to
Simple regex question. I have a string on the following format: this is a
This seems deceptively simple. How do you override the onclick event in the following
Okay, this is following on from my previous question reguarding performing a simple ajax
I have the following simple function: private void EnableDisable941ScheduleBButton() { if (this._uosDepositorFrequency.Value != null)
This is what I thought would be a simple select clause, however the following

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.