Closed yasirs closed 11 years ago
I am storing files:
u = User.new u.avatar = params[:file] u.save!
and retreiving files like this:
u = User.find(:first) data = u.avatar.read
Is u.avatar = File.open('somewhere') required as in the Readme?
u.avatar = File.open('somewhere')
Not really, it was just a convenient way to show that a file object reference is needed.
I am storing files:
and retreiving files like this:
Is
u.avatar = File.open('somewhere')
required as in the Readme?