Often we must work on various Django applications, each one dependent on different set of libraries.
For examples, we are working on a Django 1.1 project and and we need to start a new one with the latest version of the framework.
The best solution is to keep the various environments separate, in order to ensure [...]
Tags: django, python, virtualenv
Posted in Development, Python |
Migrations, in my opinion, are one of the best things in Rails since these allow the creation and populating the database using ruby code without having to worry about which type of db run below.
That said, even writing the migration is better to follow some best practices.
1. DB Index
The first practice I strongly recommend is [...]
Tags: migrations, rails, ruby on rails, seed
Posted in Development, Metodologies, Ruby |
In today’s post I will show some optimization we can do for models. I’ll focus on how to put methods inside the right model and delegation to get a better code.
1. Put method in the right model
In our example, suppose we want to represent the animal world by creating a model Kind that represents [...]
Tags: Best Practices, delegate, named_scope, ruby on rails
Posted in Development, Ruby |
COMMENTS