URL resolver for Users, Lessons, and Series
I might as well post this then:

def resolve_url(url)
    # Resolver library now returns a hash of objects
    # Using this helper method to preserve the old functionality of returning a single object
    # Order of old return types is Lesson -&gt; Series -&gt; User
    only = [Lesson, Series, User]
    objects = Resolver.resolve(url, :only =&gt; only)
    objects.values_at(*only).compact[0]
  end
end


So first get only the necessary fields (reusing the list from the resolve call), remove nils with compact and finally return the first value; if it's empty you still get nil back.

I've also removed my comment since you've updated your post.  FWIW you could also use something like objects[Lesson] or objects[Series] or Objects[User] instead.