It’s oddly difficult to do this elegantly in Rails. This is the cleanest way I’ve found:
post.association(:comments).add_to_target(comment)
It’s oddly difficult to do this elegantly in Rails. This is the cleanest way I’ve found:
post.association(:comments).add_to_target(comment)