templates/app/lib/path_parameter/yetto_parameters.rb in hephaestus-0.3.1 vs templates/app/lib/path_parameter/yetto_parameters.rb in hephaestus-0.4.0
- old
+ new
@@ -13,13 +13,16 @@
sig { returns(String) }
def pparam_yetto_record_type
yetto_path_params.fetch(:record_type, "")
end
- sig { returns(ActionController::Parameters) }
+ sig { returns(T::Hash[String, String]) }
def yetto_path_params
- return ActionController::Parameters.new if params.blank?
+ return {} if path_parameters.blank?
- params.permit(:event, :record_type)
+ {
+ event: path_parameters.fetch(:event, ""),
+ record_type: path_parameters.fetch(:record_type, ""),
+ }
end
end
end