0
我們使用聯合0.5.5 /蒙戈映射器0.8.6 - NoMethodError(未定義的方法`ETAG」爲#<GridIO ...)
- 的Rails 2.3.8
- 的Ruby 1.9.2
- 蒙戈映射器0.8.6
- 聯合0.5.5
- 棒0.4
我們在這下面使用ETAG時收到此錯誤行代碼:
return if fresh_when(:etag => @lesson.video.etag, :last_modified => @lesson.updated_at.utc)
===
Processing LessonsController#video to mp4 (for 127.0.0.1 at 2011-12-22 20:32:51) [GET]
Parameters: {"subdomains"=>["www"], "controller"=>"lessons", "action"=>"video", "id"=>"4ccf79526905582045000041", "format"=>"mp4"}
NoMethodError (undefined method `etag' for #<GridIO _id: 4ccf846a1204cc1b2f0000e9>):
joint (0.5.5) lib/joint/attachment_proxy.rb:32:in `method_missing'
app/controllers/lessons_controller.rb:71:in `video'
這裏是課程類:
class Lesson
include MongoMapper::Document
plugin Joint
(other stuff...)
attachment :image
attachment :video
timestamps!
end
任何幫助,將不勝感激。
-Mei