-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up Code Climate issues with Open Street Map code.
- Loading branch information
Showing
3 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module PreferenceSections | ||
class MapSection | ||
def name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
class Api::OpenStreetMapConfigSerializer < ActiveModel::Serializer | ||
attributes :open_street_map_enabled, :open_street_map_provider_name, :open_street_map_provider_options | ||
# frozen_string_literal: true | ||
|
||
def open_street_map_enabled | ||
ContentConfig.open_street_map_enabled | ||
end | ||
module Api | ||
class OpenStreetMapConfigSerializer < ActiveModel::Serializer | ||
attributes :open_street_map_enabled, | ||
:open_street_map_provider_name, | ||
:open_street_map_provider_options | ||
|
||
def open_street_map_provider_name | ||
ContentConfig.open_street_map_provider_name | ||
end | ||
def open_street_map_enabled | ||
ContentConfig.open_street_map_enabled | ||
end | ||
|
||
def open_street_map_provider_name | ||
ContentConfig.open_street_map_provider_name | ||
end | ||
|
||
def open_street_map_provider_options | ||
ContentConfig.open_street_map_provider_options.to_json | ||
def open_street_map_provider_options | ||
ContentConfig.open_street_map_provider_options.to_json | ||
end | ||
end | ||
end |