Re: Shouldn''t this insert in table?

RVince
Thu, 03 Sep 2009 13:04:57 -0000

Guys, Ok here is the code (I changed the class  names and simplified
in what I sent earlier -- here is the exact code)
class ChannelsController < ApplicationController
..
  def cxl
    boxchangedata
    offToServer params[''id''].to_i,current_associate.username,
" ",
"Cxl",params[''channelnotes'']
	puts params[''cxlidx'']
	if params[''cxlidx''] == "0"
		Channelnote cnote = Channelnote.new
		cnote.note = params[''channelnotes'']
		cnote.channel_id = @channel.id
		cnote.associate_id = current_associate.id
		g=cnote.save
		puts "***"+g.to_s
	end
    render :partial => ''channelnotesfield'' # to repop the
box
  end
...
end

(Channelnote is MyB in the previous). Here is the (exact) error I am
getting from the log:

NoMethodError (undefined method `Channelnote'' for
#<ChannelsController:
0x671df1c>):
  app/controllers/channels_controller.rb:170:in `cxl''

Thanks for looking at this for me guys -- I''m just confused about why
this won''t write a Channelnote record here. -Rvince