NoMethodError in ContainerformatsController#create
undefined method `yuvstreams' for #<Containerformat:0x450f560>


hii all,
          i am getting this error i don't no what happened ,its working
fine
few days before but it not working this is code for create function

@containerformat = Containerformat.new(params[:containerformat])

if @containerformat.containerFmt == 'TS'
  @containerformat = Containerformat.new(params[:containerformat])
  @transportstream =
@containerformat.transportstreams.build(params[:transportstream])
  @transportstream.save
  @program = @transportstream.programs.build(params[:program])
  @program.save
  @user = @containerformat.users.build(params[:user])
  @user.save

  if params[:videoCodec_id]!= nil
    @stream = @program.streams.build(params[:stream])
    @stream.videocodec = Videocodec.find(@stream.videoCodec_id)
    @stream.save
  end
  if params[:audioCodec_id]!= nil
    @stream = @program.streams.build(params[:stream])
    @stream.audiocodec = Audiocodec.find(@stream.audioCodec_id)
    @stream.save
  end

end


if @containerformat.containerFmt == 'PS'
  @programstream =
@containerformat.programstreams.build(params[:programstream])
    @subtitle = @programstream.subtitles.build(params[:subtitle])
    @subtitle.save
    @programstream.save
    @stream = @programstream.streams.build(params[:stream])
    @user = @containerformat.users.build(params[:user])
    @user.save

  if params[:videoCodec_id]!= nil
    @stream = @programstream.streams.build(params[:stream])
    @stream.videocodec = Videocodec.find(@stream.videoCodec_id)
    @stream.save
  end
  if params[:audioCodec_id]!= nil
    @stream = @programstream.streams.build(params[:stream])
    @stream.audiocodec = Audiocodec.find(@stream.audioCodec_id)
    @stream.save
  end

end








if @containerformat.containerFmt == 'YUV'
  @yuvstream = @containerformat.yuvstreams.build(params[:avistream])
    #...@subtitle = @yuvstream.subtitles.build(params[:subtitle])
    #...@subtitle.save
    @yuvstream.save
    @stream = @yuvstream.streams.build(params[:stream])
    @user = @containerformat.users.build(params[:user])
    @user.save

  if params[:videoCodec_id]!= nil
    #...@stream = @programstream.streams.build(params[:stream])
    #...@stream.videocodec = Videocodec.find(@stream.videoCodec_id)
    #...@stream.save
  end
  if params[:audioCodec_id]!= nil
    #...@stream = @programstream.streams.build(params[:stream])
    #...@stream.audiocodec = Audiocodec.find(@stream.audioCodec_id)
    #...@stream.save
  end

end


if @containerformat.containerFmt == 'AVI'
  @avistream = @containerformat.avistreams.build(params[:avistream])
  @avistream.save
  @stream = @avistream.streams.build(params[:stream])
  @user = @containerformat.users.build(params[:user])
  @user.save

  if params[:videoCodec_id]!= nil
  @stream = @avistream.streams.build(params[:stream])
  @stream.videocodec = Videocodec.find(@stream.videoCodec_id)
  @stream.save
  end
  if params[:audioCodec_id]!= nil
  @stream = @avistream.streams.build(params[:stream])
  @stream.audiocodec = Audiocodec.find(@stream.audioCodec_id)
  @stream.save
  end
end







i have yuvstreams as table in my databae like other tables
avisteams,programstreams table
plzz help me out
-- 
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-t...@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