Sha256: 6190d6f86950e7ddda69f32a3b6a14b608edbee92d4c2334f0996ddc12648392
Contents?: true
Size: 519 Bytes
Versions: 4
Compression:
Stored size: 519 Bytes
Contents
#= require handlebars # Resolves string keys with dots in a deeply nested object # http://stackoverflow.com/a/22129960/4405214 resolveObject = (path, obj) -> path.split('.').reduce ((prev, curr) -> if prev then prev[curr] else undefined ), obj || self Handlebars.registerHelper "t", (key) -> translation = resolveObject key, Spree.translations return translation if translation console.error "No translation found for #{key}." key Handlebars.registerHelper "admin_url", -> Spree.pathFor("admin")
Version data entries
4 entries across 4 versions & 1 rubygems