Removed not needed empty lines.

This commit is contained in:
Martin Edenhofer 2013-06-04 09:00:09 +02:00
parent f3ca2f4d8e
commit 04d35f0096
2 changed files with 7 additions and 7 deletions

View file

@ -10,7 +10,7 @@ class History < ApplicationModel
@@cache_object = {} @@cache_object = {}
@@cache_attribute = {} @@cache_attribute = {}
def self.history_create(data) def self.history_create(data)
# lookups # lookups
if data[:history_type] if data[:history_type]
@ -179,7 +179,7 @@ class History < ApplicationModel
if item['history_object'] == 'User' if item['history_object'] == 'User'
users[ item['o_id'] ] = User.user_data_full( item['o_id'] ) users[ item['o_id'] ] = User.user_data_full( item['o_id'] )
end end
# load users # load users
if !users[ item['created_by_id'] ] if !users[ item['created_by_id'] ]
users[ item['created_by_id'] ] = User.user_data_full( item['created_by_id'] ) users[ item['created_by_id'] ] = User.user_data_full( item['created_by_id'] )
@ -227,7 +227,7 @@ class History < ApplicationModel
return history_type return history_type
end end
def self.history_object_lookup_id( id ) def self.history_object_lookup_id( id )
# use cache # use cache
return @@cache_object[ id ] if @@cache_object[ id ] return @@cache_object[ id ] if @@cache_object[ id ]
@ -238,7 +238,7 @@ class History < ApplicationModel
return history_object return history_object
end end
def self.history_object_lookup( name ) def self.history_object_lookup( name )
# use cache # use cache
return @@cache_object[ name ] if @@cache_object[ name ] return @@cache_object[ name ] if @@cache_object[ name ]
@ -258,7 +258,7 @@ class History < ApplicationModel
return history_object return history_object
end end
def self.history_attribute_lookup( name ) def self.history_attribute_lookup( name )
# use cache # use cache
return @@cache_attribute[ name ] if @@cache_attribute[ name ] return @@cache_attribute[ name ] if @@cache_attribute[ name ]

View file

@ -39,7 +39,7 @@ class Observer::History < ActiveRecord::Observer
# do not send anything if nothing has changed # do not send anything if nothing has changed
return if current.attributes == record.attributes return if current.attributes == record.attributes
puts "HISTORY OBSERVER, object will be updated #{ record.class.name.to_s}.find(#{ current.id.to_s })" puts "HISTORY OBSERVER, object will be updated #{ record.class.name.to_s}.find(#{ current.id.to_s })"
# puts 'current' # puts 'current'
# puts current.inspect # puts current.inspect
@ -169,4 +169,4 @@ class Observer::History < ActiveRecord::Observer
end end
h h
end end
end end