How do I save Paperclip uploads in a particular folder?

The Paperclip gem is probably the most used gem for uploading files into Rails apps. It’s been around for a very long time, it has a large community around it and is properly battle-tested. However, it does allow you some control over the generated URLs, but not a great deal. You can specify the url… Continue reading

attr_encrypted and keeping your application safe

So you’ve installed the attr_encrypted gem as there’s some data that you need to keep safe, but also need to retrieve again. This encrypts the data in the database, but if your application is hacked it doesn’t provide any help does it? What stops me from running Person.all.map{|p| p. api_password} to get all their passwords?… Continue reading

How do I encrypt data in my database?

It’s a rough, tough world out there. There’s bad guys lurking round every street corner, just looking to break into your database and sup on the sweet, sweet data within. Mmmm, sticky, gooey records … Most databases that get exposed tend to just have the data contents leaked. So if you’ve got anything sensitive in… Continue reading