how slight ask collection activerecord objects


currently, i wish ask slight organisation activerecord objects, i have structure so:



messages = message.find(:all)
csv = message.to_csv(messages)


how i interpretation slight it's structured so?



messages = message.find(:all)
csv = messages.to_csv


this tide denote code:



require 'fastercsv'
class summary < activerecord::base
def message.to_csv(messages)
fastercsv.generate |csv|
csv << ["from","to", "received"]
m messages
csv << [m.from,m.to,m.created_at]
end
end
end
end


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?