renderpartial - can't pass locals to parital Rails -


मेरे पास एक आंशिक _new_user_form.html.erb

  & Lt;% = form_for (@ यूज़र,: रिमोट = & gt; सच,: html = & gt; {: id = & gt; 'new_user_form'}) | एफ |% & gt; & Lt; मजबूत & gt; & lt;% =: form_text% & gt; & lt; / मजबूत & gt; & Lt;% = f.text_field: ईमेल,: प्लेसहोल्डर = & gt; Get_placeholder_text (@board),: आकार = & gt; "30"% & gt; & Lt;% = hidden_field_tag: भूमिका, भूमिका% & gt; & Lt;% = f.submit "सहेजें",: वर्ग = & gt; "बटन-छोटा"% & gt; & Lt;% end% & gt; Show.rb में मैं इसका उपयोग करना चाहता हूं और कुछ आंशिक चर में निम्नानुसार गुजारना चाहता हूं:  
  & lt;% = रेंडर 'users / new_user_form' ,: स्थानीय = & gt; {: भूमिका = & gt; "उत्सव"}% & gt;   

हालांकि मुझे यह त्रुटि मिलती है:

  अपरिभाषित स्थानीय वैरिएबल या # & lt; # & lt; वर्ग के लिए विधि 'भूमिका': 0x00000103d5e8b0 & gt ;: 0x00000103d5b930 & gt;   

मैं स्थानीय लोगों के पास होने के बारे में दस्तावेजों को पढ़ता हूं और यह सही लगता है। क्या मैं गलत कर रहा हूं?

आप छोटी और लंबी रूपों के संयोजन कर रहे हैं इनमें से कोई भी सही (समान) है:

  रेंडर 'my_partial',: foo = & gt; 'बार' रेंडर: आंशिक = & gt; 'My_partial',: स्थानीय = & gt; {: Foo = & gt; 'बार'}    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -