Module: Localeapp::Routes::Export
- Included in:
- Localeapp::Routes
- Defined in:
- lib/localeapp/routes/export.rb
Instance Method Summary collapse
Instance Method Details
#export_endpoint(options = {}) ⇒ Object
4 5 6 |
# File 'lib/localeapp/routes/export.rb', line 4 def export_endpoint( = {}) [:get, export_url()] end |
#export_url(options = {}) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/localeapp/routes/export.rb', line 8 def export_url( = {}) [:format] ||= 'yml' url = http_scheme.build(.merge(:path => export_path([:format]))) url.query = [:query].map { |k,v| "#{k}=#{v}" }.join('&') if [:query] url.to_s end |