PRX/PRX.org-Backend — pull request #22 by kookster (2014-04-03 05:27:37+00:00)
Title: cast parent of paged_collection correctly so nested url is generated

it keeps track of the parent of a paged collection, and tries to use this parent when generating the urls for next, prev, etc.

However, it was failing to cast (i.e. parent.becomes(base_class)) the parent before attempting to use the `polymorphic_url` to get the url, and so it wasn't matching the declared routes (e.g. it was looking for an **individual_accounts**/:id/stories route instead of **accounts**/:id/stories.

Fix is to cast in the `paged_collection.parent` method to the base_class.

(fixes PRXNXT-31: http://jira.prx.org/browse/PRXNXT-31)