def resubscribe(&block)
block.call if block
return unless configured?
if unsubscribing?
unsubscribe
elsif subscribing? || merge_vars_changed?
subscribe
end
end
def allowed?
configured? && @model.subscribed
end
def subscribing?
merge_vars_changed? && @model.subscribed
end
"merge_vars_changed?" always return false and if i want to unsubscribe "@model.subscribed" will be false and will conflict with the "def allowed?" so it will not be possible to unsubscribe.
I had to put it like that if i wanted it to change the subscribe or unsubscribe in mailchimp.com
def allowed?
configured?
end
def subscribing?
@model.subscribed
end
Maybe i'm wrong and broke everything, can you explain if i'm wrong.
rails 1.9.3p194 spree 2-0
In spree_chimpy/lib/spree/chimpysubscription.erb
When we want to "subscribe" or "unsubscribe" with the checkbox on http://0.0.0.0:3000/fr//account/edit
"merge_vars_changed?" always return false and if i want to unsubscribe "@model.subscribed" will be false and will conflict with the "def allowed?" so it will not be possible to unsubscribe.
I had to put it like that if i wanted it to change the subscribe or unsubscribe in mailchimp.com
Maybe i'm wrong and broke everything, can you explain if i'm wrong.