Skip to content

Instantly share code, notes, and snippets.

@jcuffe
Created September 19, 2012 22:55
Show Gist options
  • Select an option

  • Save jcuffe/3752878 to your computer and use it in GitHub Desktop.

Select an option

Save jcuffe/3752878 to your computer and use it in GitHub Desktop.
before_save do
self.temp = self.attachment
def attachment
self.read_column('attachment')
end
end
after_save do
self.attachment = self.temp
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment