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 am working on coding a GUI with C#. I'm following this simple tutorial
I'm following this tutorial to create a simple Hello World extension for Chrome: http://code.google.com/chrome/extensions/getstarted.html
i have made a simple php contact form following this tutorial: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme The big
Disclaimer: not sure this is WordPress related or not. I'm following a simple tutorial
I'm following this tutorial to add a simple jquery tooltip. The tutorial uses three
I am following this tutorial http://net.tutsplus.com/tutorials/create-a-simple-music-streaming-app-with-ruby-on-rails/ , but use the aws_sdk instead of aws_s3.
I'm doing this simple tutorial on the following website: http://www.phpeasystep.com/phptu/6.html Is the code that
BACKGROUND: So, I've been following this tutorial on how to build your own simple
I followed this tutorial to create a simple command-line gem and now I want
I been following this tutorial on creating a simple API with Node.js and MongoDB,

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.