Project

General

Profile

« Previous | Next » 

Revision bb3572ff

Added by Daniel Lobato Garcia over 8 years ago

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.

View differences:

app/views/api/v2/hosts/main.json.rabl
:compute_profile_id, :compute_profile_name, :capabilities, :provision_method,
:puppet_proxy_id, :certname, :image_id, :image_name, :created_at, :updated_at,
:last_compile, :puppet_status
if SETTINGS[:organizations_enabled]
attributes :organization_id, :organization_name
end
if SETTINGS[:locations_enabled]
attributes :location_id, :location_name
end
attributes :organization_id, :organization_name if SETTINGS[:organizations_enabled]
attributes :location_id, :location_name if SETTINGS[:locations_enabled]

Also available in: Unified diff