Fix budget investments sorting by title
As we cannot order budget investments by any translatable field through AR queries we are doing the same using ruby Array sort method and doing array pagination manually with Kaminari 'paginate_array' helper method.
This commit is contained in:
committed by
voodoorai2000
parent
bb2ee6dd3c
commit
eb2e402a92
@@ -17,6 +17,8 @@ module Globalizable
|
||||
translation_class.send :acts_as_paranoid, column: :hidden_at
|
||||
end
|
||||
|
||||
scope :with_translation, -> { joins("LEFT OUTER JOIN #{translations_table_name} ON #{table_name}.id = #{translations_table_name}.#{reflections["translations"].foreign_key} AND #{translations_table_name}.locale='#{I18n.locale }'") }
|
||||
|
||||
private
|
||||
|
||||
def searchable_globalized_values
|
||||
|
||||
Reference in New Issue
Block a user