Class: WelcomeController
Instance Method Summary
collapse
#add_breadcrumb, #after_sign_in_path_for, #breadcrumbs, #new_session_path, #require_admin_user
Instance Method Details
#help ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/welcome_controller.rb', line 14
def help
root_ns = Rails.configuration.mediaflux["api_root_collection_namespace"]
parent_collection = Rails.configuration.mediaflux["api_root_collection_name"]
@test_path = Pathname.new(root_ns).join(parent_collection)
@test_http_headers = false
unless current_user.nil?
@test_http_headers = params["http-headers"] == "true"
request = if @test_http_headers
Mediaflux::AssetExistRequest.new(session_token: current_user.mediaflux_session, path: @test_path, session_user: current_user)
else
Mediaflux::AssetExistRequest.new(session_token: current_user.mediaflux_session, path: @test_path)
end
@test_path_exist = request.exist?
end
end
|
#index ⇒ Object
6
7
8
9
10
11
12
|
# File 'app/controllers/welcome_controller.rb', line 6
def index
if current_user.blank?
render layout: "welcome"
else
redirect_to dashboard_path
end
end
|