Sha256: faa786e8dd4f7bcad73d05baeb1ef6d3ebc9db19183f684e00300d2a713d7c83
Contents?: true
Size: 558 Bytes
Versions: 16
Compression:
Stored size: 558 Bytes
Contents
module Localeapp module Routes module Remove def remove_endpoint(options = {}) [:delete, remove_url(options)] end def remove_url(options = {}) url = http_scheme.build(base_options.merge(:path => remove_path(options[:key], options[:format]))) url.to_s end private def remove_path(key, format = nil) raise "remove_path requires a key" if key.nil? path = translations_path << "/#{escape_key(key)}" path << ".#{format}" if format path end end end end
Version data entries
16 entries across 16 versions & 1 rubygems