diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-03-15 01:28:25 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-03-15 01:28:25 +0100 |
commit | 26a7258247e0d05688b74886984f0914c39544b4 (patch) | |
tree | 8fa25a149f7c41fe5fc57ef1231936cf1c5678c8 | |
parent | cb6ce1a7431002564ebc37d5a3010f3feea3e6a2 (diff) | |
download | ecs-26a7258247e0d05688b74886984f0914c39544b4.tar.gz ecs-26a7258247e0d05688b74886984f0914c39544b4.zip |
Remove unnecessary "all" method from search clause.
-rw-r--r-- | app/models/message.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/message.rb b/app/models/message.rb index 4814adc..67d87f6 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -137,8 +137,7 @@ class Message < ActiveRecord::Base # return first messages from fifo/lifo queue def self.fifo_lifo_rest(namespace, ressource, participant_id, options={:queue_type => :fifo}) - m = all. - readonly(false). + m = readonly(false). joins(:ressource, :membership_messages => { :membership => :participant }). where(:participants => { :id => participant_id }, :ressources => { :namespace => namespace, :ressource => ressource }). |