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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:39:47+00:00 2026-05-19T13:39:47+00:00

<% @labels.each do |label| %> <input type=text name=<%=label.name%> value=<%=@car.(label.related_to) %> class=big-font style=width: <%=label.width%>px; top:

  • 0
<% @labels.each do |label| %>
    <input type="text" name="<%=label.name%>" value="<%=@car.(label.related_to) %>" class="big-font" style="width: <%=label.width%>px; top: <%=label.y_coor%>px; left: <%=label.x_coor%>px;" /> 
<% end %>

Hello guys, I’m new to rails so this should be a fairly easy question to answer.

The issue is here: <%=@car.(label.related_to) %>.

label.related_to holds the string “make”. I’m trying to get it to do this pretty much: @car.make

Any idea guys?

Thanks,
Alain

  • 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-19T13:39:48+00:00Added an answer on May 19, 2026 at 1:39 pm

    Use send to send a message to an object:

    @car.send(label.related_to)
    

    If there is any chance of label.related_to not being a valid method for the object, you’ll probably want to be prepared to catch the NoMethodError

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

Sidebar

Related Questions

I have an Element Like <div class=control> <label>&nbsp;</label> <input type=checkbox id=1><span class=controlText>Check Box</span> <div
Let's say I have an html form. Each input/select/textarea will have a corresponding <label>
I have a table with each cell containing a label and a text field.
I have a page where I combine labels, input boxes and text areas to
I need a simple window with three input boxes and three labels (login name,
I'm searching for a jQuery plugin that does this. for example: <label><input type=checkbox depends_on=foo=5
I am trying to style some form labels by selecting them with their 'for'
Checkboxes in HTML forms don't have implicit labels with them. Adding an explicit label
<div style=display:none> <form id=login_form method=post action=> <p id=login_error>Please, enter data</p> <p> <label for=login_name>Login: </label>
How can I specify a custom error message for each error type, like required

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.