Forum: Ruby on Rails undefined method `has_key?'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
87768988ca831c7c84300c9751c25f04?d=identicon&s=25 Michael Gao (hashman)
on 2009-10-23 07:07
I update rails from 2.0.2 to 2.2.3, the line below can work at old
version but report error at new version

<%= render_partial "_jsdatacombo" %>

the error is:

undefined method `has_key?' for "_jsdatacombo":String

It seemed if I user render_partial function, the system always report
the error.

Any has ideas?
96146b7a23174e2e024c06a49f845bb8?d=identicon&s=25 Jeffrey L. Taylor (Guest)
on 2009-10-23 08:18
(Received via mailing list)
Quoting Michael Gao <rails-mailing-list@andreas-s.net>:
>
> I update rails from 2.0.2 to 2.2.3, the line below can work at old
> version but report error at new version
>
> <%= render_partial "_jsdatacombo" %>
>

render_partial is obsolete.  Use <%= render :partial => 'jsdatacombo' %>

(Rails will insert the underscore on the front of the name,
automagically.)

HTH,
  Jeffrey
87768988ca831c7c84300c9751c25f04?d=identicon&s=25 Michael Gao (hashman)
on 2009-10-23 08:50
Jeffrey L. Taylor wrote:
> Quoting Michael Gao <rails-mailing-list@andreas-s.net>:
>>
>> I update rails from 2.0.2 to 2.2.3, the line below can work at old
>> version but report error at new version
>>
>> <%= render_partial "_jsdatacombo" %>
>>
>
> render_partial is obsolete.  Use <%= render :partial => 'jsdatacombo' %>
>
> (Rails will insert the underscore on the front of the name,
> automagically.)
>
> HTH,
>   Jeffrey

Ok, it work, thanks
This topic is locked and can not be replied to.