From: Alex Young Date: 2007-11-13T20:19:07+09:00 Subject: Re: File Uploading codes Nadeesha Meththananda wrote: > ######### the model ################### > > class Post < ActiveRecord::Base > def self.save(person) > f = File.new("pictures/#{person['name']}/picture.jpg", "wb") > f.write params[:picture].read You'll probably get a better response over on the Rails list, but I suspect this is your problem - the params hash isn't in scope in ActiveRecord descendants. You should have more luck if you define your method as def self.save(person, picture), and call it in you controller as Post.save(params[:person], params[:picture]). > SO IF SOMEBODY KNOW HOW TO OVER COME THIS PROBLEM PLS REPLY NO NEED TO SHOUT! :-) -- Alex