Skip to content

Conversation

@atimmer
Copy link
Contributor

@atimmer atimmer commented Feb 5, 2022

I wasn't aware of how to use assets with this gem. I can image more people will have this issue when they're used to asset-url. So to help them add a note to the README.

See #137

Copy link
Contributor

@dixpac dixpac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I've just left one small reamark.
But, this is definitely helpful 👍🏼

cc @dhh

README.md Outdated

### Using asset-pipeline assets

To use assets from the asset pipeline one would normally use `asset-url`. This doesn't work with Tailwind, as the CSS is not processed with sass. Instead use `url(image.svg)`, [since Sprockets v3.3.0](https://github.com/rails/sprockets-rails/pull/476) the URL will automatically be rewritten. In Tailwind this looks like this:
Copy link
Contributor

@dixpac dixpac Feb 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the URL will automatically be rewritten for me as a reader this is a bit too abstract, can we expand a bit on this so I don't have to open PR link to understand what rewritten means.

@dhh
Copy link
Member

dhh commented Feb 19, 2022

We should just assert how it works. No need to confuse it with what used to be true in the past.

Clarify how it works so readers don't have to open the Sprockets PR.
Also remove any mention of how it used to work, this should be an
evergreen README comment.
@atimmer
Copy link
Contributor Author

atimmer commented Feb 28, 2022

I have rewritten the paragraph that explains how it works.

@dhh dhh merged commit f28ea82 into rails:main Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants