search for: surname_for_sort

Displaying 1 result from an estimated 1 matches for "surname_for_sort".

2006 Feb 19
2
how would you implement this normalizer?
...used throughout the application I was thinking on some sort of generator whose usage would be: class User < ActiveRecord::Base normalize_for_sorting :surname end The intention is not to modify surname, we need it in the views, normalize_for_sroting would generate a method User#surname_for_sorting and configure it as a creation/finding filter that applies the necessary tr///. The aim is: * We normalize the strings once and store them in attributes instead of applying the normalizer in all sort blocks * The tr///, the configuration of filters, etc. is written in on...