app/models/polymorphic/version.rb in fat_free_crm-0.16.4 vs app/models/polymorphic/version.rb in fat_free_crm-0.17.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ @@ -42,10 +44,10 @@ def latest(options = {}) includes(:item, :related, :user) .where(({ item_type: options[:asset] } if options[:asset])) .where(({ event: options[:event] } if options[:event])) - .where(({ whodunnit: options[:user].to_s } if options[:user])) + .where(({ whodunnit: options[:user].to_s } if options[:user])) .where('versions.created_at >= ?', Time.zone.now - (options[:duration] || 2.days)) .limit(options[:max]) .default_order end