Move the i18n loading to an initializer
Use after_initialize to avoid rails resetting the translations
This commit is contained in:
parent
1bcde09125
commit
e530d4f54d
2 changed files with 3 additions and 1 deletions
|
@ -107,7 +107,6 @@ class SiteController < ApplicationController
|
|||
end
|
||||
|
||||
def communities
|
||||
OsmCommunityIndex::LocalChapter.add_to_i18n # this should be called on app init
|
||||
@local_chapters = OsmCommunityIndex::LocalChapter.local_chapters
|
||||
end
|
||||
|
||||
|
|
3
config/initializers/osm_community_index.rb
Normal file
3
config/initializers/osm_community_index.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
Rails.configuration.after_initialize do
|
||||
OsmCommunityIndex::LocalChapter.add_to_i18n
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue