2016-02-18 11:00:03 +01:00
|
|
|
class MessageThreadsController < ApplicationController
|
|
|
|
|
|
|
|
before_filter -> { require_plugin_enabled FoodsoftMessages }
|
|
|
|
|
|
|
|
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
|