don't know the paginator, never thought this thing worked.
now it depends on what information you like to have in the view and what your sql-skills are;-)
simple but with deadlines looming algorithm, two queries:
thats the rails way.
you can get it in one shot, but thats heavy sql-stuff.
basically you can
select parts.* [...] from parts
left join photos on [...] [etc.]
#finally
join(
select distinct photos.id from photos
where ...
order ...
limit ...
offset ...
) as limiter on limiter.id = photos.id
;
something like that, from the top of my head though
1 to 4 of 4