Is this the code that's supposed to use the Rails app's only when in Rails4?

What's the point of the first  `if app.respond_to?(:secrets)`, both the `if` and the 'elsif` have the same body, is only the second one needed? If `app.config` has a `secret_key_base`, then use it, the end. Is there a need for first checking if `app.respond_to?(:secrets)`?