Create recursive OpenStruct from a Ruby Hash
#
Tags:
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.
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: User and Admin) without repetitions.
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.
I needed simple searching on some models, and I didn’t want to use any plugin for this task, just because I’d like to try the new rails3 features, like ActiveRelation (Arel).