Output String while expecting hash

Hi
I have been trying to fetch the output as an
hash but it is returning string.I am storing the data

in the following format.


:input_type:

  • text_field

  • ride_from

:label: Ride From

:input_type:

  • text_field

  • ride_from

:label: Ride From

  • :input_type:

    • select_tag

    • trip_frequency

    • Single TripDaily Trip</

option>Once WeeklyFrequently

:label: Trip Frequency

I am trying to use “send” to convert to html tags like :

          <[email protected]_field.each do |form_field| -%>
         <div class="registration-user-fields">
            <div class="registration-field-text">
               <%=form_field[:label]-%>:
            </div>
            <div class="registration-field-value">
             <%=send(form_field[:input_type][0],

“attributes[#{form_field[:input_type][1]}]”, form_field[:input_type]
[2],:class=>“reg-input-box”)-%>

In the model i have specified serialize the table field name
“form_field”

it is working well in other table but returning as string in this
table help please.

Regards
Prashanth

On Mar 5, 3:37 pm, Prashanth [email protected] wrote:

In the model i have specified serialize the table field name
“form_field”

it is working well in other table but returning as string in this
table help please.

If your data is getting truncated because the column is too small then
you’ll get back a yaml string rather than the unserialized object.

Fred