github
25 of 26 new or added lines in 5 files covered. (96.15%)
1 existing line in 1 file now uncovered.13843 of 14268 relevant lines covered (97.02%)
1397.43 hits per line
|
class Layout::AdminHeaderComponent < ApplicationComponent |
5✔ |
|
attr_reader :user
|
5✔ |
|
delegate :namespace, :namespaced_root_path, :show_admin_menu?, to: :helpers |
5✔ |
4 |
|
|
|
def initialize(user) |
5✔ |
|
@user = user
|
2,584✔ |
7 |
end
|
|
8 |
|
|
|
private |
5✔ |
10 |
|
|
|
def namespaced_header_title |
5✔ |
|
if namespace == "moderation/budgets" |
2,584✔ |
NEW
|
t("moderation.header.title")
|
× |
|
elsif namespace == "management" |
2,584✔ |
|
t("management.dashboard.index.title")
|
314✔ |
16 |
else
|
|
|
t("#{namespace}.header.title")
|
2,270✔ |
18 |
end
|
|
19 |
end
|
|
20 |
|
|
|
def namespace_path |
5✔ |
|
if namespace == "officing" |
2,584✔ |
|
"#"
|
147✔ |
24 |
else
|
|
|
namespaced_root_path |
2,437✔ |
26 |
end
|
|
27 |
end
|
|
28 |
end
|