Revision bb3572ff
Added by Daniel Lobato Garcia over 8 years ago
app/models/nic/managed.rb | ||
---|---|---|
delegate :operatingsystem_id, :hostgroup_id, :environment_id,
|
||
:overwrite?, :to => :host, :allow_nil => true
|
||
|
||
register_to_enc_transformation :type, lambda { |type| type.constantize.humanized_name }
|
||
register_to_enc_transformation :type, ->(type) { type.constantize.humanized_name }
|
||
|
||
# this ensures we can create an interface even when there is no host queue
|
||
# e.g. outside to Host nested attributes
|
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.