Things that amaze me about Rails in a good way: make an association, build a form with association_ids, and boom, auto-created association.
@olivierlacan Would still prefer requiring an explicit call on the server instead of magically as a side effect of assignment.
-
-
@olivierlacan e.g. user.article_ids = [1] can delete records, and its really not apparent from the code. -
@sgrif That’s a good point. Seems like that should be an API if it isn’t already for sure. - 5 more replies
New conversation -
-
-
@sgrif It’s extreeeeemely convenient with has_many through associations for which I want to create the has_many records. How explicit? -
@olivierlacan Something like user.articles.replace(params[:article_ids])
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.