Split of app/model/ticket.rb to app/model/ticket/search.rb and app/model/permission.rb.
This commit is contained in:
parent
4b623f9e8e
commit
9fa835014d
2 changed files with 17 additions and 2 deletions
|
@ -24,11 +24,26 @@ class Ticket < ApplicationModel
|
|||
|
||||
include Ticket::Escalation
|
||||
include Ticket::Subject
|
||||
include Ticket::Permission
|
||||
extend Ticket::Search
|
||||
extend Ticket::Permission
|
||||
|
||||
attr_accessor :callback_loop
|
||||
|
||||
=begin
|
||||
|
||||
merge tickets
|
||||
|
||||
ticket = Ticket.find(123)
|
||||
result = ticket.merge_to(
|
||||
:ticket_id => 123,
|
||||
)
|
||||
|
||||
returns
|
||||
|
||||
result = true|false
|
||||
|
||||
=end
|
||||
|
||||
def agent_of_group
|
||||
Group.find( self.group_id ).users.where( :active => true ).joins(:roles).where( 'roles.name' => 'Agent', 'roles.active' => true ).uniq()
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ returns
|
|||
|
||||
=end
|
||||
|
||||
def self.search (params)
|
||||
def search (params)
|
||||
|
||||
# get params
|
||||
query = params[:query]
|
||||
|
|
Loading…
Reference in a new issue