class Autochthon::Web
Public Instance Methods
expand_translation(key, value)
click to toggle source
# File lib/autochthon/web.rb, line 16 def expand_translation(key, value) keys = key.split(I18n::Backend::Flatten::FLATTEN_SEPARATOR) keys[0...-1].reverse.inject(keys.last => value) do |out, k| {k => out} end end
json()
click to toggle source
# File lib/autochthon/web.rb, line 12 def json @json ||= JSON.parse(request.body.read, symbolize_names: true) end