Thanks for your answer but it give the error

Started POST "/scripts" for 127.0.0.1 at 2012-02-16 15:53:50 +0900
  Processing by ScriptsController#create as JS
  Parameters: {"utf8"=>"✓", 
"authenticity_token"=>"9rMiPwxlQrXiAIgUy8Qqe77KXDezXmpLF4WLupZb5ME=", 
"script"=>{"video_id"=>"18", "startp"=>"85", "text"=>"korejyadamedann"}, 
"commit"=>"save"}
   (0.1ms)  SELECT 1 FROM "scripts" WHERE "scripts"."startp" = 85 LIMIT 
1
  SQL (0.7ms)  INSERT INTO "scripts" ("created_at", "startp", "text", 
"updated_at", "video_id") VALUES (?, ?, ?, ?, ?)  [["created_at", Thu, 
16 Feb 2012 06:53:50 UTC +00:00], ["startp", 85], ["text", 
"korejyadamedann"], ["updated_at", Thu, 16 Feb 2012 06:53:50 UTC 
+00:00], ["video_id", 18]]
Rendered videos/save.js.erb (1.5ms)
Completed 500 Internal Server Error in 138ms

ActionView::Template::Error (Called id for nil, which would mistakenly 
be 4 -- if you really wanted the id of nil, use object_id):
    1:
    2:
    3: $('#listtrans').html('<%= escape_javascript(render :partial => 
"videos/script_list", :locals => { :scripts => 
Script.find_all_by_video_id(@video.id) } ) %>');
    4:
    5:
    6:
  app/views/videos/save.js.erb:3:in 
`_app_views_videos_save_js_erb__2673251445733535399_2157206780'
  app/controllers/scripts_controller.rb:47:in `block (2 levels) in 
create'
  app/controllers/scripts_controller.rb:43:in `create'


Does anyone know why?

soichi

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to