Adinda Praditya wrote:
> saya sudah restart servernya setelah menambahkan
> action upload_file di routes.rb.
> 2008/8/27 Adinda Praditya <[EMAIL PROTECTED]>
>> Ini routes.rb saya:
>>
>> map.resources :speeches, :collection => {
>> :upload_file => 'get'
>> }
>> map.resources :speeches
>>
>> Dan saya sudah konfirmasi melalui rake routes
>>
>> $ rake routes|grep speech
>> upload_file_speeches GET
>> /speeches/upload_file {:controller=>"speeches",
>> :action=>"upload_file"}
>> formatted_upload_file_speeches GET
>> /speeches/upload_file.:format {:controller=>"speeches",
>> :action=>"upload_file"}
>> GET
>> /speeches {:controller=>"speeches",
>> :action=>"index"}
>>
>> Mengapa saya masih dapat error RecordNotFound saat mengakses
>> http://localhost:3000/speeches/upload_file ?
Karena Anda tidak menyertakan ID dari Record yang diinginkan, sehingga
Active Record otomatis raise ActiveRecord::RecordNotFound Exception.
clue1: perhatikan bedanya :collection sama :member ya.
clue2: perhatikan apakah sdh ada callback yg panggil itu record.
kalau setelah clue1 dan clue2 sudah juga diperiksa dan sudah pasti
benar, silakan report lagi kesini.
http://ariekeren.blogdetik.com
"Don't ask if you can ask, just ask!", R2D2