* chat mesages by scope in admin

This commit is contained in:
Seth Call 2016-02-01 15:44:31 -06:00
parent c8179ccbcc
commit 8f36304c26
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,12 @@ ActiveAdmin.register JamRuby::ChatMessage, :as => 'ChatMessage' do
config.sort_order = 'created_at DESC'
scope("Global", default:true) { |scope|
scope.where("channel = 'global'")
}
scope("Session", ) { |scope|
scope.where("channel = 'session'")
}
index do
column 'User' do |oo| link_to(oo.user.email, oo.user.admin_url, {:title => oo.user.email}) end
column "Timestamp" do |post|