Skip to content

Commit

Permalink
Fix markdown link in UPGRADING.md (#137)
Browse files Browse the repository at this point in the history
Fixes the markdown link for `raw` docs.
  • Loading branch information
ocarreterom authored May 7, 2023
1 parent 91c05a4 commit a8bbfd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ It's a common pattern in apps to inline small SVG files and low resolution versi
Rails.application.assets.load_path.find('logo.svg').content
```

As Rails escapes html tags in views by default, in order to output a rendered svg you will need to specify rails not to escape the string using [html_safe](https://api.rubyonrails.org/classes/String.html#method-i-html_safe) or [raw]((https://api.rubyonrails.org/classes/ActionView/Helpers/OutputSafetyHelper.html#method-i-raw).
As Rails escapes html tags in views by default, in order to output a rendered svg you will need to specify rails not to escape the string using [html_safe](https://api.rubyonrails.org/classes/String.html#method-i-html_safe) or [raw](https://api.rubyonrails.org/classes/ActionView/Helpers/OutputSafetyHelper.html#method-i-raw).
```ruby
Rails.application.assets.load_path.find('logo.svg').html_safe
raw Rails.application.assets.load_path.find('logo.svg')
Expand All @@ -263,4 +263,4 @@ Propshaft uses a dynamic assets resolver in development mode. However, when you

If you wish to have dynamic assets resolver enabled again, you need to clean your target folder (usually `public/assets`) and propshaft will start serving dynamic content from source.

Another way to watch changes in your CSS & JS assets is by running `bin/dev` command instead of `rails server` that not only runs the server but also keeps looking for any changes in the assets and once it detects any changes, it compiles them while the server is running. This is possible because of the `Procfile.dev`.
Another way to watch changes in your CSS & JS assets is by running `bin/dev` command instead of `rails server` that not only runs the server but also keeps looking for any changes in the assets and once it detects any changes, it compiles them while the server is running. This is possible because of the `Procfile.dev`.

0 comments on commit a8bbfd8

Please sign in to comment.