Avoiding nested if statements 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?
One suggestion is to make the roles two classes, initialize them based on the role and call the save function.

 class UserRole
    def save(product)
     redirect_to new_product_offer_path(product) 
    end
 end
 class AdminRole &lt; UserRole
    def save(product)
     redirect_to krowd_path(product) 
    end
 end
 def create_role(r)
    case r
    when :admin
        return AdminRole.new()
    else
        return UserRole.new()
    end
 end


 ....
 role = create_role(current_member.role)

 if @product.save 
   role.save(@product) 
 else 
   render :new 
 end