before_validation :set_portable_data_hash
validate :ensure_hash_matches_manifest_text
+ # Query only undeleted collections by default.
+ default_scope { where("expires_at IS NULL or expires_at > CURRENT_TIMESTAMP") }
+
api_accessible :user, extend: :common do |t|
t.add :name
t.add :description