Extract methods in footer component

This way it'll be easier to change and refactor this code.
This commit is contained in:
Javi Martín
2023-10-08 22:15:38 +02:00
parent 219d71baaf
commit 05345fb43c
2 changed files with 14 additions and 2 deletions

View File

@@ -4,4 +4,16 @@ class Layout::FooterComponent < ApplicationComponent
def footer_legal_content_block
content_block("footer_legal")
end
private
def open_source_link
link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "_blank",
rel: "nofollow")
end
def repository_link
link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "_blank",
rel: "nofollow")
end
end