Hey all,

I am trying to find a way to store an hash of variable size (could be
3 pairs, could by 8 pairs) in a text field in the database.  I have
the following [simplified] setup:

# model
  serialize :content

# controller
  [all the normal create, edit, etc. stuf]

# view
 <% form_for @grading_scale do |f| %>
    <%= f.text_field 'content[1][letter]' %>
    <%= f.text_field 'content[1][grade]' %>
    <%= f.text_field 'content[2][letter]' %>
    <%= f.text_field 'content[2][grade]' %>
      ...
  <% end %>


This actually stores the correct data in the database and it even
shows up in the view when I show <%= debug @scale %>.  However, no
matter how hard I try I cannot get it to display the data from the
database in the text fields.  I can change/add new data without
problems but I can't show the user the data.  What am I doing wrong?

Thanx!
  Richard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to