I have three Models (and growing): ContactEmail, ContactCall, ContactPostalcard
I want to cycle through the three of them to go through a pretty lengthy loop.
A sample would would be the following:
import_event = ContactEmail.sugarcrm_is(false) #using searchlogic gem
The second loop would be:
import_event = ContactCall.sugarcrm_is(false)
I would I guess like a way to do something like:
event_array = ["ContactEmail", "ContactCall", "ContactPostalcard"]
event_array.each do |event|
import_event = event_array.sugarcrm_is(false)
.....
end
But not sure how to do that...thanks!