Displaying 1 result from an estimated 1 matches for "find_or_create_by_video_id".
2012 Feb 22
3
Parent id for find_or_create method
...o_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| %>
    <%= f.hidden_field :video_id %>
  <%= f.text_field :startp, :...