[問題] 有玩過flickraw 請入內
環境:
Ruby 1.8.7 Rails 3.1.1
狀況:
正在練習將上傳照片到flickr上~
目前已經可以登入 並取得授權
不過就在上傳檔案的地方掛掉~
error 訊息是
ArgumentError (wrong number of arguments (1 for 0)):
app/controllers/uploads_controller.rb:73:in `upload_photo_to_Flickr'
附錄:
upload.html.haml
= form_tag ({:action => :upload_photo_to_Flickr},:multipart => true )do
= hidden_field_tag :token, @upload_info[:token]
= label_tag "照片"
= file_field_tag :photo
= submit_tag "按我按我~上傳照片"
uploads_controller.rb
before_filter :flickraw_login ,:only => [:upload_photo_to_Flickr]
def upload_photo_to_Flickr
flickr.upload_photo params[:photo] , :title => "Title", :description => "This is the description"
end
卡關好久...
可能是哪裡出了問題?
btw , 新竹有沒有ROR的定期聚會阿~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.96.29.49
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章