Skip to content

Commit

Permalink
Consider ransack aliases when sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
faragorn committed Feb 14, 2017
1 parent 4adfd10 commit 0e14f02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ransack/nodes/sort.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def valid?
end

def name=(name)
@name = name
context.bind(self, name)
@name = context.ransackable_alias(name) || name
context.bind(self, @name) unless @name.blank?
end

def dir=(dir)
Expand Down

0 comments on commit 0e14f02

Please sign in to comment.