app/controllers/thredded/theme_previews_controller.rb in thredded-0.15.5 vs app/controllers/thredded/theme_previews_controller.rb in thredded-0.16.0

- old
+ new

@@ -8,10 +8,14 @@ @user = if thredded_current_user.thredded_anonymous? Thredded.user_class.new(id: 1334, name: 'joe', email: 'joe@example.com') else thredded_current_user end - @messageboards = Thredded::Messageboard.all + @messageboard_views = [ + Thredded::MessageboardView.new(@messageboard, unread_topics_count: 3, unread_followed_topics_count: 2), + Thredded::MessageboardView.new(Thredded::Messageboard.first(2)[-1], unread_topics_count: 2), + Thredded::MessageboardView.new(Thredded::Messageboard.first(3)[-1]), + ] @topics = Thredded::TopicsPageView.new(@user, @messageboard.topics.page(1).limit(3)) @private_topics = Thredded::PrivateTopicsPageView.new(@user, @user.thredded_private_topics.page(1).limit(3)) topic = Thredded::Topic.new(messageboard: @messageboard, title: 'Hello', slug: 'hello', user: @user) @topic = Thredded::TopicView.from_user(topic, @user) @posts = Thredded::TopicPostsPageView.new(@user, topic, topic.posts.page(1).limit(3))