NoMethodError in ContainerformatsController#create

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

Amit Tomar wrote:

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

hiii guys
i got my answer
i just missed
has: yuvstreams in my containerformat class