Remove postgres-specific SQL from UsersStarProject

This commit is contained in:
Camil Staps 2019-02-05 13:33:49 +01:00
parent c1126d2b10
commit 1289efcc62
No known key found for this signature in database
GPG key ID: 4A9BFD4F6A415F83

View file

@ -12,8 +12,8 @@ class UsersStarProject < ApplicationRecord
alias_attribute :starred_since, :created_at
scope :order_user_name_asc, -> { joins(:user).reorder('"users"."name" ASC') }
scope :order_user_name_desc, -> { joins(:user).reorder('"users"."name" DESC') }
scope :order_user_name_asc, -> { joins(:user).reorder('users.name ASC') }
scope :order_user_name_desc, -> { joins(:user).reorder('users.name DESC') }
scope :by_project, -> (project) { where(project_id: project.id) }
scope :with_visible_profile, -> (user) { joins(:user).merge(User.with_visible_profile(user)) }