Khi chạy thử nghiệm điều khiển di sản như thế này:ActionController :: InvalidCrossOriginRequest trong điều khiển thử nghiệm
get :edit, id: object.id, format: :js
xét nghiệm của tôi bắt đầu thất bại trong Rails 4.1 với các lỗi sau:
ActionController::InvalidCrossOriginRequest: Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.
Cú pháp này đã thay đổi thành 'get edit_url (object), xhr: true' trong Rails 5. –