search for: create_or_update_script

Displaying 1 result from an estimated 1 matches for "create_or_update_script".

2012 Feb 22
3
Parent id for find_or_create method
..."new_script", :locals => { :script => Script.new(:video_id => @video.id)} %> which works fine. Now I would like to develop further. The Script objects may have already existed and if so, I want to update after editing them. So I tried, <%= render :partial => "create_or_update_script", :locals => { :script => Script.find_or_create_by_video_id(:video_id => @video.id)} %> renders a partial, <%= form_for script, :url=>{:controller=>''scripts'', :action=>''create_or_update''}, :remote => true do |f| %>...