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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -