Hash is treated as string in Rails 4.1

4 views
Skip to first unread message

Gaohong Wei

unread,
Apr 26, 2015, 4:47:36 PM4/26/15
to rubyonra...@googlegroups.com
I have defined an instance variable as Hash in controller. When the instance variable is retrieved in View, its type is String, and the value is string too.
Something wrong?

tamouse pontiki

unread,
Apr 26, 2015, 4:55:22 PM4/26/15
to rubyonra...@googlegroups.com
On Sun, Apr 26, 2015 at 11:57 AM, Gaohong Wei <gaoho...@gmail.com> wrote:
I have defined an instance variable as Hash in controller. When the instance variable is retrieved in View, its type is String, and the value is string too.
Something wrong?

Can't tell without seeing code. 

Colin Law

unread,
Apr 26, 2015, 4:55:23 PM4/26/15
to rubyonra...@googlegroups.com
Yes, something is wrong, obviously. Unfortunately it is not possible
for us to tell what is wrong unless you show us how you are assigning
the value to it and the code that renders it that shows it is a
string. Also what is the value of the hash and what does it render
as?

Colin
Reply all
Reply to author
Forward
0 new messages