Wednesday, August 27, 2014

Send transactional emails with Mandrill in Rails (using mailchimp template)

Guys,

Following is the great link for understanding the mechanics of MailChimp -> ManDrill.



Note: The only draw back what I see is when we send a template, to be used, to ManDrill from MailChimp (ofcourse after integration). It creates a redundancy because its a hard send rather a linking.

Rest, great job by the ManDrill.

--
Regards,
Pavan Agrawal

Wednesday, October 9, 2013

Sorting ruby array based on one condition

Example

1.9.2p320 :013 > ["Carter's", "Gerber", "Petit Bateau (as pictured)"].sort_by { |word| word.include?('(as pictured)') ? 0 : 1}

 => ["Petit Bateau (as pictured)", "Gerber", "Carter's"]