diff options
author | Akira Matsuda <ronnie@dio.jp> | 2019-06-15 15:19:13 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2019-06-15 15:19:13 +0900 |
commit | c8a84603e2fa97822407bf4a1c8ac0308a899163 (patch) | |
tree | 57558c998866cf1447b2be46a10fc5346c71eb39 /actionview | |
parent | e919a008485b3739706968e6ab6ce752f3245e03 (diff) | |
download | rails-c8a84603e2fa97822407bf4a1c8ac0308a899163.tar.gz rails-c8a84603e2fa97822407bf4a1c8ac0308a899163.tar.bz2 rails-c8a84603e2fa97822407bf4a1c8ac0308a899163.zip |
:golf:
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index ebda5a167e..bfac4c08a0 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -279,12 +279,8 @@ module ActionView format, variant = pieces.last.split(EXTENSIONS[:variants], 2) if pieces.last format = if format Template::Types[format]&.ref - else - if handler.respond_to?(:default_format) # default_format can return nil - handler.default_format - else - nil - end + elsif handler.respond_to?(:default_format) # default_format can return nil + handler.default_format end # Template::Types[format] and handler.default_format can return nil |