diff --git a/app/models/ticket/number/date.rb b/app/models/ticket/number/date.rb index 7d64ccc81..a625bbfb2 100644 --- a/app/models/ticket/number/date.rb +++ b/app/models/ticket/number/date.rb @@ -62,7 +62,7 @@ module Ticket::Number::Date end number += chksum.to_s end - return number + number end def check(string) @@ -78,6 +78,6 @@ module Ticket::Number::Date elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,50})/i then ticket = Ticket.where( number: $1 ).first end - return ticket + ticket end end diff --git a/app/models/ticket/number/increment.rb b/app/models/ticket/number/increment.rb index 2297eff73..d3bc2987a 100644 --- a/app/models/ticket/number/increment.rb +++ b/app/models/ticket/number/increment.rb @@ -9,7 +9,7 @@ module Ticket::Number::Increment config = Setting.get('ticket_number_increment') # read counter - min_digs = config[:min_size] || 4; + min_digs = config[:min_size] || 4 counter_increment = nil Ticket::Counter.transaction do counter = Ticket::Counter.where( generator: 'Increment' ).lock(true).first @@ -65,7 +65,7 @@ module Ticket::Number::Increment end number += chksum.to_s end - return number + number end def check(string) @@ -82,6 +82,6 @@ module Ticket::Number::Increment elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,48})/i then ticket = Ticket.where( number: $1 ).first end - return ticket + ticket end end diff --git a/app/models/ticket/overviews.rb b/app/models/ticket/overviews.rb index 34caad2f5..17518533c 100644 --- a/app/models/ticket/overviews.rb +++ b/app/models/ticket/overviews.rb @@ -181,7 +181,7 @@ returns where( _condition( overview_selected.condition ) ). count() - return { + { tickets: tickets, tickets_count: tickets_count, overview: overview_selected_raw, @@ -245,6 +245,6 @@ returns end } bind[0] = sql - return bind + bind end end diff --git a/app/models/ticket/permission.rb b/app/models/ticket/permission.rb index 6a81de573..19d19844a 100644 --- a/app/models/ticket/permission.rb +++ b/app/models/ticket/permission.rb @@ -41,7 +41,7 @@ returns data[:current_user].groups.each {|group| return true if self.group.id == group.id } - return false + false end end diff --git a/app/models/ticket/screen_options.rb b/app/models/ticket/screen_options.rb index 9a3db1b71..748e62dee 100644 --- a/app/models/ticket/screen_options.rb +++ b/app/models/ticket/screen_options.rb @@ -113,7 +113,7 @@ returns } } - return { + { assets: assets, filter: filter, dependencies: dependencies, @@ -167,7 +167,7 @@ returns assets = ticket.assets(assets) } - return { + { ticket_ids_open: ticket_ids_open, ticket_ids_closed: ticket_ids_closed, assets: assets, diff --git a/app/models/ticket/search.rb b/app/models/ticket/search.rb index bb5ccf73d..a350e649b 100644 --- a/app/models/ticket/search.rb +++ b/app/models/ticket/search.rb @@ -52,7 +52,7 @@ returns limit = params[:limit] || 12 current_user = params[:current_user] full = false - if params[:full] || !params.has_key?(:full) + if params[:full] || !params.key?(:full) full = true end @@ -140,7 +140,7 @@ returns tickets_all.each { |ticket| tickets.push Ticket.lookup( id: ticket.id ) } - return tickets + tickets end end diff --git a/app/models/ticket/state.rb b/app/models/ticket/state.rb index cdc42d0ec..40447d557 100644 --- a/app/models/ticket/state.rb +++ b/app/models/ticket/state.rb @@ -48,6 +48,6 @@ returns: def ignore_escalation? ignore_escalation = ['removed', 'closed', 'merged'] return true if ignore_escalation.include?( self.name ) - return false + false end end diff --git a/app/models/ticket/subject.rb b/app/models/ticket/subject.rb index 2343efabb..27a89319b 100644 --- a/app/models/ticket/subject.rb +++ b/app/models/ticket/subject.rb @@ -73,6 +73,6 @@ returns subject = subject[ 0, ticket_subject_size.to_i ] + '[...]' end - return subject + subject end end diff --git a/app/models/user/permission.rb b/app/models/user/permission.rb index ae412d4f7..afac37a24 100644 --- a/app/models/user/permission.rb +++ b/app/models/user/permission.rb @@ -30,7 +30,7 @@ returns # check agent return true if data[:current_user].is_role(Z_ROLENAME_ADMIN) return true if data[:current_user].is_role('Agent') - return false + false end end diff --git a/app/models/user/search.rb b/app/models/user/search.rb index 41ea0db2c..3f1fb4144 100644 --- a/app/models/user/search.rb +++ b/app/models/user/search.rb @@ -50,7 +50,7 @@ returns '(firstname LIKE ? or lastname LIKE ? or email LIKE ?) AND id != 1', "%#{query}%", "%#{query}%", "%#{query}%", ).order('firstname').limit(limit) end - return users + users end end diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index 4ccdd6135..0890a8f34 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -712,7 +712,7 @@ class TestCase < Test::Unit::TestCase file = File.join(Dir.pwd, filename) #file = 'some test lalal' - element = instance.find_elements( { css: params[:css] } )[0].send_keys file + instance.find_elements( { css: params[:css] } )[0].send_keys file #instance.find_elements( { :css => params[:css] } )[0] #element #@driver.find_element(id: 'file-submit').click