I am getting an error on using .send
wrong # of arguments(1 for 0)



deal bitte wrote in post #1069050:
> I cannot create a hash as I do not add all columns in database. It
> varies based on my values
>
> rid = Rid.new
> database_columns=['ExternalRef', 'Originator', 'Responder', 'Title',
> 'Category', 'Location', 'Observation',
> 'Recommendation','Concern','Document_id', 'OriginatorRef']
> session_db_array=[1,3,4,5,6,7,9]    #this value varies and is not fixed
> data_save_array = params[:c].collect{|value| value} #this value varies
> session_db_array.length.times do |i|
>   rid.send(database_columns[session_db_array[i]],data_save_array[i])
>   rid.date =  Time.new
>   rid.workflow = 0
>   rid.project_id = session[:projectid]
> end
>  rid.save

-- 
Posted via http://www.ruby-forum.com/.