Module: Qcourses::ResourcePaths::UrlHelpers

Included in:
ClassMethods
Defined in:
lib/qcourses/resource_paths.rb

Instance Method Summary collapse

Instance Method Details

#admin_edit_request_url(param) ⇒ Object



31
32
33
# File 'lib/qcourses/resource_paths.rb', line 31

def admin_edit_request_url(param)
  adminprefix + edit_request_url(param)
end

#admin_new_request_urlObject



28
29
30
# File 'lib/qcourses/resource_paths.rb', line 28

def admin_new_request_url
  adminprefix + new_request_url
end

#admin_request_url(param = nil) ⇒ Object



25
26
27
# File 'lib/qcourses/resource_paths.rb', line 25

def admin_request_url(param = nil)
  adminprefix + request_url(param)
end

#adminprefixObject



10
11
12
# File 'lib/qcourses/resource_paths.rb', line 10

def adminprefix
  settings.admin_url
end

#basepathObject



13
14
15
# File 'lib/qcourses/resource_paths.rb', line 13

def basepath
  settings.basepath
end

#edit_request_url(param = nil) ⇒ Object



22
23
24
# File 'lib/qcourses/resource_paths.rb', line 22

def edit_request_url(param = nil)
  [basepath,'edit', param_symbol(param)].compact.join('/')
end

#new_request_url(param = nil) ⇒ Object



19
20
21
# File 'lib/qcourses/resource_paths.rb', line 19

def new_request_url(param = nil)
  [request_url, 'new', param_symbol(param)].compact.join('/')
end

#request_url(param = nil) ⇒ Object



16
17
18
# File 'lib/qcourses/resource_paths.rb', line 16

def request_url(param = nil)
  [basepath, param_symbol(param)].compact.join('/')
end