Implicitly create associated model from string

Posted by singpolyma on Stack Overflow See other posts from Stack Overflow or by singpolyma
Published on 2010-03-25T21:44:05Z Indexed on 2010/03/25 22:33 UTC
Read the original article Hit count: 245

Filed under:
|

I have a model Post that has_many :tags

I want to do:

Post.create({:tags => ['tag1', 'tag2']})

How can I make that work?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about activerecord