app/controllers/password_resets_controller.rb
# Return params[outer][inner] but handle nil gracefully by returning nil.
# This makes it easier to avoid nil dereferences.
Return params[outer][inner] but handle nil gracefully by returning nil.
This makes it easier to avoid nil dereferences.
Return params [ outer ] [ inner ] but handle nil gracefully by returning nil . This makes it easier to avoid nil dereferences .
def nested_params(outer, inner)
    return if params.nil? || !params.key?(outer)
    return unless params[outer].key?(inner)
    params[outer][inner]
  end
def nested_params ( outer , inner ) return if params . nil? || ! params . key? ( outer ) return unless params [ outer ] . key? ( inner ) params [ outer ] [ inner ] end
Return params[outer][inner] but handle nil gracefully by returning nil.
Return params [ outer ] [ inner ] but handle nil gracefully by returning nil .
outer
<not_specific>
inner
<not_specific>