On Sat, Dec 15, 2012 at 9:53 PM, Mas Bejo <li...@ruby-forum.com> wrote: > i want to get value from 2 diffrent field, first > from text_field, and second from select_date, and i want to save it in > one field "TTL" in database, this is the syntax, > i change my model file to be like this:
See: http://api.rubyonrails.org/classes/ActiveRecord/Base.html (search "serialize") ...If you want to be able to be able to select by that field you'll need a custom serializer and PostgreSQL so you can use Hstore (you can also use JSON datatype in PostgreSQL 9.2 but that requires even more work because JSON is still a new feature so it doesn't have the same select support that Hstore has.) -- 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 rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.