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/taxonomies/show.json.rabl
extends "api/v2/hostgroups/base"
end
if @taxonomy.kind_of?(Location)
if @taxonomy.is_a?(Location)
child :organizations => :organizations do
extends "api/v2/taxonomies/base"
end
end
if @taxonomy.kind_of?(Organization)
if @taxonomy.is_a?(Organization)
child :locations => :locations do
extends "api/v2/taxonomies/base"
end
end
node do |taxonomy|
{ :parameters => partial("api/v2/parameters/base", :object => taxonomy.parameters) }
{ :parameters => partial("api/v2/parameters/base", :object => taxonomy.parameters) }
end

Also available in: Unified diff