Check condition before rendering action using link_to_unless

Good day!

I have a typical purchase order system that I am moving from a legacy
platform to a Rails platform.
I am obviously trying to change as little as possible from the GUI
standpoint so as not to confuse the current users.

Therefore, when generating a new Purchase Order, the user must enter
pertinent information into the form.
After entering the information, they are to proceed to a Purchase Order
Detail screen where they will enter products associated with the new
purchase order.

What I want to do, is require the user to save the Purchase Order
information before they proceed to the Purchase Order Detail screen.
Obviously doing this seamlessly would be ideal, but if I have to produce
pop-up of some sort (even an AJAX dialog) would be fine.

I currently have the following code in the top of my view on the
Order form:

New Traded Purchase Order

    <% # List of all the controllers here. [ PurchaseOrderController, PurchaseOrderDetailController ].each do |c_class| %>
  • <% c_human_name =[0..-11].underscore.humanize %> <%= link_to_unless_current_controller(c_class, c_human_name, { :controller => '/' + c_class.controller_path }) %>
  • <% end %>

Is there any “easy” way to modify the code to add this check
to save the PO before proceeding to the PurchaseOrderDetail screen?