class User < ActiveRecord::Base attr_accessible :picture
Assuming you have the setting above, on the console:
user = User.last user.picture.set_filename('/some/picture.jpg') user.skip = true
It should be noted that if you are on the console and are updating an existing entry that has an attached file (for example, user.picture.file), it will show the old URL / location. If you leave the console (if you are not in sandbox mode) and go back and request the same object, it will have an updated URL / location.
source share