This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ConstDependency = require('webpack/lib/dependencies/ConstDependency'); | |
var NullFactory = require('webpack/lib/NullFactory'); | |
var _ = require('lodash'); | |
function I18nRuntimePlugin(options) { | |
options = options || {}; | |
this.functionNames = options.functionNames || ['I18n.t', 'I18n.translate']; | |
this.translationsPlaceholder = options.translationsPlaceholder || 'I18N_RUNTIME_TRANSLATIONS'; | |
this.fullTranslations = options.fullTranslations || {}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goal: Allow addition of instances to a collection in a factory-built object | |
# when those instances require references to the parent. | |
# Typically occurs in Rails when one model has_many instances of another | |
# See more at: | |
# http://stackoverflow.com/questions/2937326/populating-an-association-with-children-in-factory-girl | |
# Usage | |
# Foo has_many :bar | |
# |