Skip to content

Instantly share code, notes, and snippets.

@jaimeiniesta
Created October 3, 2010 23:17
Show Gist options
  • Save jaimeiniesta/609042 to your computer and use it in GitHub Desktop.
Save jaimeiniesta/609042 to your computer and use it in GitHub Desktop.
# Example on how to get the local file path for an attachment_fu attachment on a model
# (photos, in this example)
def attachment_fu_local_file_path
Rails.root+"/public/photos/"+("%08d" % id).scan(/..../).join('/')+"/"+filename
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment