Module: Localeapp::Routes::Rename

Included in:
Localeapp::Routes
Defined in:
lib/localeapp/routes/rename.rb

Instance Method Summary collapse

Instance Method Details

#rename_endpoint(options = {}) ⇒ Object



4
5
6
# File 'lib/localeapp/routes/rename.rb', line 4

def rename_endpoint(options = {})
  [:post, rename_url(options)]
end

#rename_url(options = {}) ⇒ Object



8
9
10
11
# File 'lib/localeapp/routes/rename.rb', line 8

def rename_url(options = {})
  url = http_scheme.build(base_options.merge(:path => rename_path(options[:current_name], options[:format])))
  url.to_s
end