{"action":"closed","issue":{"url":"https://api.github.com/repos/rubytaiwan/AMA/issues/21","labels_url":"https://api.github.com/repos/rubytaiwan/AMA/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/rubytaiwan/AMA/issues/21/comments","events_url":"https://api.github.com/repos/rubytaiwan/AMA/issues/21/events","html_url":"https://github.com/rubytaiwan/AMA/issues/21","id":108548836,"number":21,"title":"請問如果寫一個可以上傳多張照片的部落格，建議用哪種架構？","user":{"login":"afgnsu","id":7204469,"avatar_url":"https://avatars.githubusercontent.com/u/7204469?v=3","gravatar_id":"","url":"https://api.github.com/users/afgnsu","html_url":"https://github.com/afgnsu","followers_url":"https://api.github.com/users/afgnsu/followers","following_url":"https://api.github.com/users/afgnsu/following{/other_user}","gists_url":"https://api.github.com/users/afgnsu/gists{/gist_id}","starred_url":"https://api.github.com/users/afgnsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afgnsu/subscriptions","organizations_url":"https://api.github.com/users/afgnsu/orgs","repos_url":"https://api.github.com/users/afgnsu/repos","events_url":"https://api.github.com/users/afgnsu/events{/privacy}","received_events_url":"https://api.github.com/users/afgnsu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-27T17:22:27Z","updated_at":"2015-09-28T11:49:52Z","closed_at":"2015-09-28T11:49:52Z","body":"如題，假設我用rails g scaffold blog name content:text 產生部落格，照片搭配 Carrierwave套件，究竟該跟Rails101s的留言一樣，把照片獨立出來，然後用巢狀(nest)路由呢？還是乾脆簡單把照片用p1、p2、p3...的方式加入 blog 這個Model裡比較簡單方便？ 因為我看到網路上是用另一種方式  \r\naccepts_nested_attributes_for :photos, allow_destroy: true\r\n\r\n但是不太懂用法，可以解釋一下嗎？\r\n\r\nhttps://u.osu.edu/hasnan.1/2014/03/30/rails-4-multiple-file-upload-with-carrierwave-nested-form-and-jquery-file-upload/"}}