You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trevorturk edited this page Jun 9, 2011
·
1 revision
If you want to track the "dirty?" state of the upload column you can check the state of the cache.
@user.avatar.cached?.present?# means dirty?
In this example, a column is said to be dirty if it has been changed but not yet saved to persistence. In our case a file was uploaded (cached) but not yet "saved" to configured storage (filesystem, s3 etc)
You could also be using ActiveRecord's dirty tracking on the column you mount on.