@@ -139,7 +139,6 class CustomField < ActiveRecord::Base | |||||
139 | case field_format |
|
139 | case field_format | |
140 | when 'string', 'text', 'list', 'date', 'bool' |
|
140 | when 'string', 'text', 'list', 'date', 'bool' | |
141 | # COALESCE is here to make sure that blank and NULL values are sorted equally |
|
141 | # COALESCE is here to make sure that blank and NULL values are sorted equally | |
142 | self.custom_values.first.to_sql |
|
|||
143 | "COALESCE((SELECT cv_sort.value FROM #{CustomValue.table_name} cv_sort" + |
|
142 | "COALESCE((SELECT cv_sort.value FROM #{CustomValue.table_name} cv_sort" + | |
144 | " WHERE cv_sort.customized_type='#{self.class.customized_class.base_class.name}'" + |
|
143 | " WHERE cv_sort.customized_type='#{self.class.customized_class.base_class.name}'" + | |
145 | " AND cv_sort.customized_id=#{self.class.customized_class.table_name}.id" + |
|
144 | " AND cv_sort.customized_id=#{self.class.customized_class.table_name}.id" + |
General Comments 0
You need to be logged in to leave comments.
Login now