Revision bb3572ff
Added by Daniel Lobato Garcia over 8 years ago
app/models/config_group.rb | ||
---|---|---|
scoped_search :on => :hostgroups_count
|
||
scoped_search :on => :config_group_classes_count
|
||
|
||
default_scope lambda { order('config_groups.name') }
|
||
default_scope -> { order('config_groups.name') }
|
||
|
||
# the following methods are required for app/views/puppetclasses/_class_selection.html.erb
|
||
alias_method :classes, :puppetclasses
|
Also available in: Unified diff
Refs #3809 - Stabby lambda syntax for oneliners
I started by spotting log.rb which didn't have a lambda wrapping its
default scope, as needed by Rails 4. Since the style guide and most
Rails 4 documents used the stabby lambda, I turned on the cop so that we
use it everywhere there's a oneliner lambda.