diff options
author | José Valim <jose.valim@gmail.com> | 2010-10-10 22:40:13 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-10 23:12:22 +0200 |
commit | 682368d4ba0bb4548f896d02bc4e038ee8ba6b4d (patch) | |
tree | ec2b03c8a1adae7fd7089aabc5466b8b3a932b11 /actionpack/lib/action_view/template.rb | |
parent | f659a1576fc4a447bbfbd866c7244d8d790a3d9c (diff) | |
download | rails-682368d4ba0bb4548f896d02bc4e038ee8ba6b4d.tar.gz rails-682368d4ba0bb4548f896d02bc4e038ee8ba6b4d.tar.bz2 rails-682368d4ba0bb4548f896d02bc4e038ee8ba6b4d.zip |
Use identifiers for template equality.
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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) |