My objective is to count the number of conditions that are true. I created an instance variable @cta_count to hold the count.
I would like to make signing_ctas? true if @cta_count > 0. This is not working. Why? I thought the last if statement would make the signing_ctas true or false.
def signing_ctas? @cta_count = 0
if !(@order.already_a_club_member
@cta_count+=1
end
if @order.copayed? && @order.order_agreement_required? && !@order.copayer_order_agreement_done?
@cta_count+=1
end
if @cta_count > 0
end
Yes, Pat. These big blocks of code are very un-ruby like that I created. It turns out that the whole logic will be changed to make it DRY by a senior developer.