Revision bb3572ff
Added by Daniel Lobato Garcia over 8 years ago
app/models/model.rb | ||
---|---|---|
validates_lengths_from_database
|
||
validates :name, :uniqueness => true, :presence => true
|
||
|
||
default_scope lambda { order('models.name') }
|
||
default_scope -> { order('models.name') }
|
||
|
||
scoped_search :on => :name, :complete_value => :true, :default_order => true
|
||
scoped_search :on => :info
|
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.