foodsoft/plugins/messages/app/controllers/message_threads_controller.rb
2019-10-29 09:41:01 +01:00

13 lines
360 B
Ruby

class MessageThreadsController < ApplicationController
before_action -> { require_plugin_enabled FoodsoftMessages }
def index
@groups = Group.order(:name)
end
def show
@group = Group.find_by_id(params[:id])
@message_threads = Message.pub.threads.where(group: @group).page(params[:page]).per(@per_page).order(created_at: :desc)
end
end