I occasionally find myself bumping into code like this (either in other projects or banging out initial prototypes myself):
if @product.save
if current_member.role == "admin"
redirect_to krowd_path(@product)
else
redirect_to new_product_offer_path(@product)
end
else
render :new
end
What is a good way to avoid this type of situation all together?