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:

config/initializers/apipie.rb
# config.languages = [] # turn off localized API docs and CLI, useful for development
config.languages = ENV['FOREMAN_APIPIE_LANGS'].try(:split, ' ') || FastGettext.available_locales
config.default_locale = FastGettext.default_locale
config.locale = lambda { |loc| loc ? FastGettext.set_locale(loc) : FastGettext.locale }
config.locale = ->(loc) { loc ? FastGettext.set_locale(loc) : FastGettext.locale }
substitutions = {
:operatingsystem_families => Operatingsystem.families.join(", "),

Also available in: Unified diff