2016-02-18 11:00:03 +01:00
|
|
|
class MessageThreadsController < ApplicationController
|
|
|
|
|
2019-10-28 21:11:35 +01:00
|
|
|
before_action -> { require_plugin_enabled FoodsoftMessages }
|
2016-02-18 11:00:03 +01:00
|
|
|
|
|
|
|
def index
|
2016-03-04 17:24:28 +01:00
|
|
|
@groups = Group.order(:name)
|
2016-02-18 11:00:03 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
2016-03-04 17:24:28 +01:00
|
|
|
@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)
|
2016-02-18 11:00:03 +01:00
|
|
|
end
|
|
|
|
end
|