What is the best way to create a form for editing a model attribute which is an array of strings in

Posted by foggedin on Stack Overflow See other posts from Stack Overflow or by foggedin
Published on 2010-06-08T01:50:58Z Indexed on 2010/06/08 1:52 UTC
Read the original article Hit count: 273

Filed under:
|

Take a model with an attribute that is an array of strings. This attribute is serialized to the database.

class MyModel < ActiveRecord::Base
  serialize :str_array
end

In the edit view I would like to display a text field for each element of the array allowing the user to view and modify the attributes elements.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about haml