Diff
Modified: trunk/app/models/pack.rb (2905 => 2906)
--- trunk/app/models/pack.rb 2012-01-17 15:24:03 UTC (rev 2905)
+++ trunk/app/models/pack.rb 2012-01-19 09:51:21 UTC (rev 2906)
@@ -942,9 +942,4 @@
boost
end
-
- # touch method that mimics the simple use of the rails 2 touch method
- def touch
- update_attribute(:updated_at, Time.now)
- end
end
Modified: trunk/app/models/pack_contributable_entry.rb (2905 => 2906)
--- trunk/app/models/pack_contributable_entry.rb 2012-01-17 15:24:03 UTC (rev 2905)
+++ trunk/app/models/pack_contributable_entry.rb 2012-01-19 09:51:21 UTC (rev 2906)
@@ -75,7 +75,6 @@
end
def touch_pack
- # Rails 2 - use pack.destroyed? instead of pack.contribution.nil?
- pack.touch unless pack.contribution.nil?
+ pack.touch unless pack.destroyed?
end
end
Modified: trunk/app/models/pack_remote_entry.rb (2905 => 2906)
--- trunk/app/models/pack_remote_entry.rb 2012-01-17 15:24:03 UTC (rev 2905)
+++ trunk/app/models/pack_remote_entry.rb 2012-01-19 09:51:21 UTC (rev 2906)
@@ -28,8 +28,7 @@
end
def touch_pack
- # Rails 2 - use pack.destroyed? instead of pack.contribution.nil?
- pack.touch unless pack.contribution.nil?
+ pack.touch unless pack.destroyed?
end
def available?
Modified: trunk/app/models/relationship.rb (2905 => 2906)
--- trunk/app/models/relationship.rb 2012-01-17 15:24:03 UTC (rev 2905)
+++ trunk/app/models/relationship.rb 2012-01-19 09:51:21 UTC (rev 2906)
@@ -18,8 +18,7 @@
after_destroy :touch_context
def touch_context
- # Rails 2 - use context.destroyed? instead of context.contribution.nil?
- context.touch if !context.contribution.nil? && context.respond_to?(:touch)
+ context.touch unless context.destroyed?
end
end