Displaying 1 result from an estimated 1 matches for "importscontrol".
2009 Nov 10
4
Model spec for file upload with paperclip and fastercsv
I just started my ImportsController and was this was really the way to
go:
////////import.rb/////////////////
class Import < ActiveRecord::Base
has_attached_file :csv
validates_attachment_presence :csv
after_save :process_csv
private
def process_csv
FasterCSV.foreach( csv.path) do |row|
#TODO
end
e...