Module: Rad::Controller::Authenticated::RoutingHelper

Defined in:
lib/_http_controller/authenticated.rb

Instance Method Summary collapse

Instance Method Details

#user_path(*args) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/_http_controller/authenticated.rb', line 20

def user_path *args
  options = parse_routing_arguments *args

  options = {
    # host: rad.users.host,
    # port: rad.users.port,
    url_root: rad.users.url_root,

    l: I18n.locale
  }.merge(options)

  name = options.delete(:id)
  # options[:url_root] = rad.config.users!.url_root! unless options.include? :url_root

  url_for_path "/profiles/#{name}/show", options
end