ruby - ransack custom attributes sorting in rails -
i'm trying sort custom attributes using ransack.
my view looks like:
%th= sort_link @open_search, :status_step_name, 'status step', { open_page: '' }, :remote => true in model:
scope :status_step_name, lambda {|name| approvals.where("status != 'approved'").order("position").first} this customized column displayed in table. works fine , i'm able display current status step projects, i'm not able sort using column name.
is i'm missing something?? ideas??
Comments
Post a Comment