Sha256: 7b69eea03663c914d6072e3703a053d096e521c4ce72a8af27aafddc7762faf8
Contents?: true
Size: 667 Bytes
Versions: 9
Compression:
Stored size: 667 Bytes
Contents
# frozen_string_literal: true require_dependency 'thredded/posts_page_view' module Thredded # A view model for a page of PostViews of a Topic. class TopicPostsPageView < PostsPageView # @return [Thredded::BaseTopicView] attr_reader :topic # @param user [Thredded.user_class] the user who is viewing the posts page # @param topic [Thredded::TopicCommon] # @param paginated_scope [ActiveRecord::Relation<Thredded::PostCommon>] def initialize(user, topic, paginated_scope) super(user, paginated_scope) @topic = "#{paginated_scope.reflect_on_association(:postable).klass}View".constantize.from_user(topic, user) end end end
Version data entries
9 entries across 9 versions & 1 rubygems