This article was originally written for the 12 Devs of Summer and posted here. It was written for beginners, I described how to get up and running withRuby and Rails and I tried to offer an in depth look at what it’s like to work with it. In this tutorial, you'll create a simple non Hello World application.
Maybe you already know and used the Ruby's OpenStruct class. I've played a bit with it to create a very easy to use configuration system for Ruby apps.
Rails 4 will use StrongParameters by default. However, it doesn't seem that Devise is ready for this feature, even using its rails4 branch. There's a good example that explains how to solve this problem when dealing with only one resource (eg:
User). I forked that code to handle more resources (eg:
Admin) without repetitions.
Uploading images with custom sizes on different models is a very common task during web development. Every time, people uses different image uploaders for each model, where the only difference is about sizes. I'd like to share a simple hack to DRY code with some metaprogramming.
When it comes to develop a CMS, one of the main problems concerns where or how to store and organize views (templates, partials, layouts) for particular needs like different layouts for specific pages, (sub)domains or multi-languages.