mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Use explicit syntax for section objects in preference_sections definition
This commit is contained in:
@@ -24,10 +24,16 @@ module Admin
|
||||
private
|
||||
|
||||
def preference_sections
|
||||
Dir["app/models/preference_sections/*.rb"].map do |filename|
|
||||
basename = 'PreferenceSections::' + File.basename(filename, '.rb').camelize
|
||||
basename.constantize.new
|
||||
end
|
||||
[
|
||||
PreferenceSections::HeaderSection.new,
|
||||
PreferenceSections::HomePageSection.new,
|
||||
PreferenceSections::ProducerSignupPageSection.new,
|
||||
PreferenceSections::HubSignupPageSection.new,
|
||||
PreferenceSections::GroupSignupPageSection.new,
|
||||
PreferenceSections::MainLinksSection.new,
|
||||
PreferenceSections::FooterAndExternalLinksSection.new,
|
||||
PreferenceSections::UserGuideSection.new
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,5 +71,5 @@ EOS
|
||||
preference :footer_about_url, :string, default: "http://www.openfoodnetwork.org/ofn-local/open-food-network-australia/"
|
||||
|
||||
#User Guide
|
||||
preference :user_guide_link, :string, default: 'http://www.openfoodnetwork.org/platform/user-guide/'
|
||||
preference :user_guide_link, :string, default: 'https://guide.openfoodnetwork.org/'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user