Calculate the url first, before calling form_for:
<%
if <some condition>
url = "/some/url"
else
url = "/another/url"
end
%>
<%= simple_form_for :order, url: url do |f| %>
This is much more readable and easier to understand/change.
UPDATE: since form_for already has two url options depending on whether the object in question has been saved (ie the value of .new_record?) then you may need to make your if-else logic take this into account too.