From 682368d4ba0bb4548f896d02bc4e038ee8ba6b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 10 Oct 2010 22:40:13 +0200 Subject: Use identifiers for template equality. --- actionpack/lib/action_view/template.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/lib/action_view/template.rb') diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 7dd8acf37b..3ba18cbfae 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -93,6 +93,7 @@ module ActionView autoload :Error autoload :Handler autoload :Handlers + autoload :Inline autoload :Text end @@ -184,6 +185,14 @@ module ActionView end end + def hash + identifier.hash + end + + def eql?(other) + other.is_a?(Template) && other.identifier == identifier + end + def inspect @inspect ||= if defined?(Rails.root) -- cgit v1.2.3