From: deal bitte Date: 2012-07-17T20:42:18+09:00 Subject: Re: undefined method error Ya.Thats there. But i want to do rid.save at the end and save the values to the database rid = Rid.new ( Mytable name is rids ) rid.Originator = bla bla rid. Title = bla bla rid.save ( to save all of them in the database ) Jan E. wrote in post #1069039: > Like I said, you have to make sure you're calling the method on the > right object. > > It seems you want to call the method on "self", so instead of > "rid.database_columns" you have to write "database_columns" without a > receiver: > > rid = Rid.new > database_columns = [ > 'ExternalRef', > 'Originator', > 'Responder', > 'Title', > 'Category', > 'Location', > 'Observation', > 'Recommendation', > 'Concern', > 'Document_id', > 'OriginatorRef' > ] > puts database_columns[0] -- Posted via http://www.ruby-forum.com/.