This is an example full of compromises.
You probably want another page displaying the form.
A partial would be better for tracking events.
search
is not really the correct terminology here, maybe lookup_tracking_number
or something, but redirecting to a show
page with an id
parameter would be better.
To clarify the paths where these files belong:
config/routes.rb
app/models/shipping.rb
app/models/tracking_event.rb
app/controllers/shippings_controller.rb
app/views/shippings/index.html.erb
app/views/shippings/search.html.erb