drapergem/draper — pull request #474 by kosmatov (2013-02-15 08:22:20+00:00)
Title: Fix decorator collections STI trouble

Decorating STI collection cause trouble with inferred decorator class:
class Movie
end

class Film < Movie
end

class Serial < Movie
end

class MovieDecorator < Draper::Decorator
delegate_all
end

class FilmDecorator < MovieDecorator
end

class SerialDecorator < MovieDecorator
end

class MoviesDecorator < Draper::CollectionDecorator
delegate :current_page, :total_pages, :limit_value
end

movies = Movie.page.decorate # MoviesDecorator of [#, #]
movies.first.class # MovieDecorator instead of FilmDecorator