Project

General

Profile

« Previous | Next » 

Revision ed67b8c9

Added by Dominic Cleal over 7 years ago

fixes #17574, #17364 - update scoped_search to 4.x

scoped_search's sort() now accepts a replacement for params which is
filtered in an overridden Foreman sort helper, permitting additional
parameters used in Foreman's index pages.

Replaces :in and :alias in search definitions with preferred keywords.

View differences:

app/models/domain.rb
validates :fullname, :uniqueness => true, :allow_blank => true, :allow_nil => true
scoped_search :on => [:name, :fullname], :complete_value => true
scoped_search :in => :domain_parameters, :on => :value, :on_key=> :name, :complete_value => true, :only_explicit => true, :rename => :params
scoped_search :relation => :domain_parameters, :on => :value, :on_key=> :name, :complete_value => true, :only_explicit => true, :rename => :params
# with proc support, default_scope can no longer be chained
# include all default scoping here

Also available in: Unified diff