diff options
Diffstat (limited to 'actionview/lib/action_view/template')
-rw-r--r-- | actionview/lib/action_view/template/html.rb | 4 | ||||
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 10 | ||||
-rw-r--r-- | actionview/lib/action_view/template/text.rb | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/actionview/lib/action_view/template/html.rb b/actionview/lib/action_view/template/html.rb index ddbd2ea36a..0ffae10432 100644 --- a/actionview/lib/action_view/template/html.rb +++ b/actionview/lib/action_view/template/html.rb @@ -14,9 +14,7 @@ module ActionView #:nodoc: "html template" end - def inspect - "html template" - end + alias_method :inspect, :identifier def to_str ERB::Util.h(@string) diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 20c2d5c782..5a2948d5a9 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -256,7 +256,7 @@ module ActionView filename.start_with?(path) end - # Helper for building query glob string based on resolver's pattern. + # Helper for building query glob string based on resolver's pattern. def build_query(path, details) query = @pattern.dup @@ -281,14 +281,14 @@ module ActionView entry.gsub(/[*?{}\[\]]/, '\\\\\\&'.freeze) end - # Returns the file mtime from the filesystem. + # Returns the file mtime from the filesystem. def mtime(p) File.mtime(p) end - # Extract handler, formats and variant from path. If a format cannot be found neither - # from the path, or the handler, we should return the array of formats given - # to the resolver. + # Extract handler, formats and variant from path. If a format cannot be found neither + # from the path, or the handler, we should return the array of formats given + # to the resolver. def extract_handler_and_format_and_variant(path, default_formats) pieces = File.basename(path).split(".".freeze) pieces.shift diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 898593e702..e8d4e18f04 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -14,9 +14,7 @@ module ActionView #:nodoc: "text template" end - def inspect - "text template" - end + alias_method :inspect, :identifier def to_str @string |