undefined method `has_key?'

95 views
Skip to first unread message

Michael Gao

unread,
Oct 23, 2009, 1:07:29 AM10/23/09
to rubyonra...@googlegroups.com
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?
--
Posted via http://www.ruby-forum.com/.

Jeffrey L. Taylor

unread,
Oct 23, 2009, 2:16:39 AM10/23/09
to rubyonra...@googlegroups.com
Quoting Michael Gao <rails-mai...@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

Michael Gao

unread,
Oct 23, 2009, 2:50:41 AM10/23/09
to rubyonra...@googlegroups.com

Ok, it work, thanks

Reply all
Reply to author
Forward
0 new messages