我的目標是這樣的一個輸出(用於每個附件):(ROR)JSON和嵌套的對象:在對象
網址: 「/上傳/附接/圖片/ 15/5ee306c9 -e263-466b-b56d-1c7c9d2ae17b.jpg」
我在看什麼:
attachments_controller.rb
class AttachmentsController < ApplicationController
before_action :logged_in_user
def index
@attachments = current_user.attachments.all
respond_to do |format|
format.json do
render :json => @attachments.each{ |o| o.picture.url }
end
end
end
...
什麼,此刻這個輸出? –
這是froala wysiwyg編輯器:https://www.froala.com/wysiwyg-editor/docs/concepts/image-manager – Lowryder