File: //usr/local/rvm/gems/ruby-2.7.4/doc/actionpack-6.1.4.1/ri/ActionController/Parameters/fetch-i.ri
U:RDoc::AnyMethod[iI"
fetch:ETI"'ActionController::Parameters#fetch;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I";Returns a parameter for the given +key+. If the +key+ ;TI"Ican't be found, there are several options: With no other arguments, ;TI"Iit will raise an <tt>ActionController::ParameterMissing</tt> error; ;TI"Kif a second argument is given, then that is returned (converted to an ;TI"Ginstance of ActionController::Parameters if possible); if a block ;TI"=is given, then that will be run and its result returned.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"Nparams = ActionController::Parameters.new(person: { name: "Francesco" })
;TI"tparams.fetch(:person) # => <ActionController::Parameters {"name"=>"Francesco"} permitted: false>
;TI"params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none
;TI"aparams.fetch(:none, {}) # => <ActionController::Parameters {} permitted: false>
;TI":params.fetch(:none, "Francesco") # => "Francesco"
;TI"9params.fetch(:none) { "Francesco" } # => "Francesco";T:@format0:
@fileI"5lib/action_controller/metal/strong_parameters.rb;T:0@omit_headings_from_table_of_contents_below00I"