Validations in rails are easy to use. Even if some custom validations have to be created, there is generic way to do it and create custom validators. The problems might appear when model instances have to be tested. Even though unit tests usually cover behavior of an instances, not validations, they are still executed in every test. Usually not to create valid objects evey time by hand, people use fixtures or factories. This way people don’t have to think about validations and tests are close to real environment (although probably validations don’t have to be tested at all or only custom ones). But the real problems appear when in order to create one valid object, lots of other objects have to be created first. This is fine if we check interconnections between those objects. But if not … setup becomes pretty painful.
Continue reading...
At the moment browsers are moving forward to html5/css3. But it will take time for users to use html5/css3 browsers only. At the moment about 60% of users are using Internet Explorer (stable version of IE doesn’t support html5/css3). This problem forces developers to forget about new features brought by new browsers and develop websites same way as they did it years and years ago. Aim of RenderIt gem is to solve this problem.
Continue reading...