Saving Paperclip Attachements Encoded Base64

Posted August 26, 2013 17:11 by Omar Abdel-Wahab

The problem:

You need to upload an image from a mobile device to a Rails application which uses Paperclip.

Your model might look similar to this:

class User < ActiveRecord::Base attr_accessible :name has_attached_file :image, styles: { small: '90x90#', medium: '160x120#', large: '300x200#', }end

And you want to be able to upload user images.

< ActiveRecord::Base attr_accessible :name has_attached_file :image, styles: { small: '90x90#', medium: '160x120#', large: '300x200#', }end Read more



Rails

Why we love Ruby on Rails

Posted July 12, 2013 14:25 by Omar Abdel-Wahab

We kind of have been asked this question over and over and we believe the reasons are so many.

Rails is an extremely mature RAD Framework to the extent that it's currently driving the MVC bandwagon. A lot of effort has been put by Java, PHP, Python...

Read more



Rails

Never create Ruby strings longer than 23 characters!

Posted December 12, 2013 16:22 by Omar Abdel-Wahab

You might think it's absurd but Pat Shaughnessy found out that Ruby strings are treated differently by Ruby interpreter and the main differentiator is; wait for it, their length.

According to his blog post, he tested string creation time under Ruby...

Read more



Ruby