-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add ERB component file, Rubocop and test fixes
Re-added the ERB component file so that there's a clear separation of concerns. This also allows us to keep the code easy to read; in case the template grows bigger, it will still be readable. Fixed the Rails/OutputSafety cop by moving the sanitize call to within the template instead of trying to do it with the component Also switched to using the `address` factory instead of a string value; the value the component expects should be an instance of the Address model and consequently the `all_address_lines` method can be called on it.
- Loading branch information
1 parent
9a530b1
commit f3b5f50
Showing
3 changed files
with
12 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p class="place_info__address" property="address" typeof="PostalAddress"> | ||
<%= sanitize formatted_address %> | ||
</p> |
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