paperclip
https://github.com/thoughtbot/paperclip
Ruby
Easy file attachment management for ActiveRecord
Paperclip::Attachment#instance_write
Writes the attachment-specific attribute on the instance. For example, instance_write(:file_name, "me.jpg") will write "me.jpg" to the instance's "avatar_file_name" field (assuming the attachment is called avatar).
Edit
git clone [email protected]:thoughtbot/paperclip.git
cd paperclip
open lib/paperclip/attachment.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Paperclip--Attachment-instance_write-for-pr
# Commit to gitgit add lib/paperclip/attachment.rbgit commit -m "better docs for Paperclip::Attachment#instance_write"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Paperclip--Attachment-instance_write-for-pr
hub pull-request
# Celebrate!