end
def find_objects_for_index
- if params[:include_trash] || ['destroy', 'trash'].include?(action_name)
- @objects = Collection.unscoped.readable_by(*@read_users)
+ if params[:include_trash] || ['destroy', 'trash', 'untrash'].include?(action_name)
+ @objects = Collection.readable_by(*@read_users).unscoped
end
super
end
show
end
+ def untrash
+ if @object.is_trashed
+ @object.update_attributes!(trash_at: nil)
+ else
+ raise InvalidStateTransitionError
+ end
+ show
+ end
+
def find_collections(visited, sp, &b)
case sp
when ArvadosModel