Corrected with rubocop cop 'Style/MultilineOperationIndentation'.

This commit is contained in:
Thorsten Eckel 2015-05-01 14:27:57 +02:00
parent 834ad2d64a
commit 39578cea49
13 changed files with 48 additions and 45 deletions

View file

@ -20,6 +20,8 @@ class Observer::Ticket::LastContact < ActiveRecord::Observer
if record.ticket.last_contact_customer == nil || if record.ticket.last_contact_customer == nil ||
record.ticket.last_contact_agent == nil || record.ticket.last_contact_agent == nil ||
record.ticket.last_contact_agent.to_i > record.ticket.last_contact_customer.to_i record.ticket.last_contact_agent.to_i > record.ticket.last_contact_customer.to_i
# set last_contact customer
record.ticket.last_contact_customer = record.created_at record.ticket.last_contact_customer = record.created_at
# set last_contact # set last_contact

View file

@ -118,6 +118,7 @@ return all online notifications of an object
) )
.order( 'created_at DESC, id DESC' ) .order( 'created_at DESC, id DESC' )
.limit( 10_000 ) .limit( 10_000 )
list = [] list = []
notifications.each do |item| notifications.each do |item|
data = item.attributes data = item.attributes

View file

@ -173,9 +173,9 @@ returns
data[:start_page] ||= 1 data[:start_page] ||= 1
tickets = Ticket.where( group_id: group_ids ) tickets = Ticket.where( group_id: group_ids )
.where( _condition( overview_selected.condition ) ) .where( _condition( overview_selected.condition ) )
.order( overview_selected[:order][:by].to_s + ' ' + overview_selected[:order][:direction].to_s )#. .order( overview_selected[:order][:by].to_s + ' ' + overview_selected[:order][:direction].to_s )
# limit( overview_selected.view[ data[:view_mode].to_sym ][:per_page] ). # .limit( overview_selected.view[ data[:view_mode].to_sym ][:per_page] )
# offset( overview_selected.view[ data[:view_mode].to_sym ][:per_page].to_i * ( data[:start_page].to_i - 1 ) ) # .offset( overview_selected.view[ data[:view_mode].to_sym ][:per_page].to_i * ( data[:start_page].to_i - 1 ) )
tickets_count = Ticket.where( group_id: group_ids ) tickets_count = Ticket.where( group_id: group_ids )
.where( _condition( overview_selected.condition ) ) .where( _condition( overview_selected.condition ) )