Rails 3.1.3

I have models and their association like,

Video 1: -------- n: Script

When users newly create a Video, I want it to create the very first
Script entry together.

I have put

    @script = Script.new(:video_id => @video.id, :startp => 0, :text =>
'ToDo: ')

in Video controller, 'new' action, but it doesn't work (:startp value is
determined for the first one).

How can I create a Script entity together with Video?

Also, if possible, I want that first Script entry to be undestroyable.
Do you think I can do it?

Thanks in advance,

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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to