     class func fetchedResultsControllerWithDelegate(delegate: NSFetchedResultsControllerDelegate, sortedBy attribute: String, ascending: Bool, sectionNameKeyPath: String) -> NSFetchedResultsController {
         return fetchedResultsControllerWithDelegate(delegate, sortedBy: attribute, ascending: ascending, inContext: NSManagedObjectContext.contextForCurrentThread, sectionNameKeyPath: sectionNameKeyPath, cacheName: nil)
     }
-
+    
     class func fetchedResultsControllerWithDelegate(delegate: NSFetchedResultsControllerDelegate, sortedBy attribute: String, ascending: Bool, sectionNameKeyPath: String, cacheName: String) -> NSFetchedResultsController {
         return fetchedResultsControllerWithDelegate(delegate, sortedBy: attribute, ascending: ascending, inContext: NSManagedObjectContext.contextForCurrentThread, sectionNameKeyPath: sectionNameKeyPath, cacheName: cacheName)
     }

import CoreData

extension NSManagedObject {

    class func fetchedResultsControllerWithDelegate(delegate: NSFetchedResultsControllerDelegate, sortedBy attribute: String, ascending: Bool) -> NSFetchedResultsController {
        return fetchedResultsControllerWithDelegate(delegate, sortedBy: attribute, ascending: ascending, inContext: NSManagedObjectContext.contextForCurrentThread, sectionNameKeyPath: nil, cacheName: nil)
    }

    class func fetchedResultsControllerWithDelegate(delegate: NSFetchedResultsControllerDelegate, sortedBy attribute: String, ascending: Bool, inContext context: NSManagedObjectContext, sectionNameKeyPath: String) -> NSFetchedResultsController {
        return fetchedResultsControllerWithDelegate(delegate, sortedBy: attribute, ascending: ascending, inContext: context, sectionNameKeyPath: sectionNameKeyPath, cacheName: nil)
    }
    
    class func fetchedResultsControllerWithDelegate(delegate: NSFetchedResultsControllerDelegate, sortedBy attribute: String, ascending: Bool, inContext context: NSManagedObjectContext, sectionNameKeyPath: String?, cacheName: String?) -> NSFetchedResultsController {
        let sortDescriptors = [ NSSortDescriptor(key: attribute, ascending: ascending) ]
        return fetchedResultsControllerWithPredicate(nil, delegate: delegate, sortDescriptors: sortDescriptors, inContext: context, sectionNameKeyPath: sectionNameKeyPath, cacheName: cacheName)
    }
    
    class func fetchedResultsControllerByAttribute(attribute: String, withValue value: CVarArgType, delegate: NSFetchedResultsControllerDelegate, sortedBy sortAttribute: String, ascending: Bool) -> NSFetchedResultsController {
        return fetchedResultsControllerByAttribute(attribute, withValue: value, delegate: delegate, sortedBy: sortAttribute, ascending: ascending, inContext: NSManagedObjectContext.contextForCurrentThread, sectionNameKeyPath: nil, cacheName: nil)
    }
    
    class func fetchedResultsControllerByAttribute(attribute: String, withValue value: CVarArgType, delegate: NSFetchedResultsControllerDelegate, sortedBy sortAttribute: String, ascending: Bool, inContext context: NSManagedObjectContext) -> NSFetchedResultsController {
        return fetchedResultsControllerByAttribute(attribute, withValue: value, delegate: delegate, sortedBy: sortAttribute, ascending: ascending, inContext: context, sectionNameKeyPath: nil, cacheName: nil)
    }
