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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:01:01+00:00 2026-06-05T23:01:01+00:00

has anyone an idea why I have the following problem with passing locals to

  • 0

has anyone an idea why I have the following problem with passing locals to a Ruby partial ?

My partial (excerpt):

 <div class="control-group">
   <%= field_prefix %>
   <%= label_tag t("shared.email"),nil,:class => "control-label" %>
   <div class="controls">
   <%= email_field_tag "[email]", contact.nil? ? "" : contact[:email]  %>
   </div>
 </div>

My partial is included in the following way:

 <%= render "shared/contact", :field_prefix => 123 , :contact => @person.contact %>

Also if i do it this way it wont`t work, the second local i pass (field_prefix) is not passed:

 <%= render :partial => "shared/contact", :locals => {:field_prefix => 123 , :contact => @person.contact } %>

I always get the error message that the local variable “field_prefix” is not recognized:

undefined local variable or method `field_prefix’ for #<#:0x5837418>

It`s coming from the partial view.

  • 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-05T23:01:02+00:00Added an answer on June 5, 2026 at 11:01 pm

    most of the time I really like Ruby but sometimes it is very very annoying and mysterious :-/

    I had to restart my IDE (RubyMine) and the integrated server to get it working without chaning any source.

    Of course the sources were saved also yesterday when I tried it first but there seems to be a cache or something like that in this IDE.

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

Sidebar

Related Questions

i have a quite strange problem. my class has -among others- following memers: GLboolean
I wonder if anyone has an idea how you have to transform an image
Has anyone got any idea to why doesn't the following work ? $file =
Wondered if anyone had any idea why the following problem is occurring, or had
has anyone an idea how to convert a UIImage to cocos2d-x CCSprite. My latest
Has anyone an idea how pipebytes.com works ? I need to implement similar system
Has anyone got any idea why the menu is rendering below the rotating images
Has anyone ever used the hidden class PackageParser in Android source code with java
I have the following problem: I want to check if a website (in a
I've got a problem that I'm rather confused about. I have the following lines

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.