Rails4 upgrade : finished to refactored models

- refactored search model