Have SubscriberList
When an order is placed I want to check if New User's email is all ready in our subscribers list.
If not, then add them. Problem is it adds them no matter what. Guess it's not performing check correctly.
Currently in my orders_controller I have
unless logged_in?
@order.subscribe_after_purchase(@order.user.email)
end
And in my Order.rb I have
def subscribe_after_purchase(email)
unless SubscriberList.exists?(email)
SubscriberList.create(:email => email)
end
end