I feel like I have been neglecting my own site for far too long. It really was time to change the layout of it to match the expectations of recent web layout standards. For a while now, everyone has been talking about responsive design and mobile first. So I figured it was time to apply it here as well.
This is not gonna be any news for a lot of people out there, but I recently discovered the beauty of the git command
stash. And even though I feel a little embarrassed about the fact that I did not discover it earlier, I decided to post a quick note about it.
One method that I frequently use in Rails is the
find_or_create_by_* method ( If you can call it one method since it comes in so many variations ). As it implies, this method will try to find a record from one or many attributes and create it if it does not find it. But like so many other functions, it has undergone some changes along the way.
I recently wanted to implement a drag and drop browser upload to one of my existing Rails applications. Even though it was not difficult, it felt quite rewarding once it was working (because I don’t like the classic upload forms). So I decided to share the solution for anyone who wants to do something similar.