Simplify calls to content_block helper
All calls were using `I18n.locale` as the second parameter, so we might as well make it optional.
This commit is contained in:
@@ -26,6 +26,6 @@ class Layout::SocialComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def footer_content_block
|
||||
content_block("footer", I18n.locale)
|
||||
content_block("footer")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,6 +8,6 @@ class Layout::TopLinksComponent < ApplicationComponent
|
||||
private
|
||||
|
||||
def top_links_content_block
|
||||
content_block("top_links", I18n.locale)
|
||||
content_block("top_links")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,7 +48,7 @@ module ApplicationHelper
|
||||
SiteCustomization::Image.image_path_for(filename) || filename
|
||||
end
|
||||
|
||||
def content_block(name, locale)
|
||||
def content_block(name, locale = I18n.locale)
|
||||
SiteCustomization::ContentBlock.block_for(name, locale)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<ul>
|
||||
<%= raw content_block("subnavigation_left", I18n.locale) %>
|
||||
<%= raw content_block("subnavigation_left") %>
|
||||
|
||||
<% if feature?(:debates) %>
|
||||
<li>
|
||||
@@ -59,6 +59,6 @@
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%= raw content_block("subnavigation_right", I18n.locale) %>
|
||||
<%= raw content_block("subnavigation_right") %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user