Skip to content

[ci skip] Correct docs for asset helpers #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2015

Conversation

alietz
Copy link
Contributor

@alietz alietz commented Aug 7, 2015

The instructions for asset helpers were reversed, so the docs told you to replace the new expression ('image-url') with the old one ('url') instead of the other way around.

@@ -68,24 +68,24 @@ in Sass):
#### `asset-path($relative-asset-path)`
Returns a string to the asset.

* `asset-path("rails.png")` becomes `"/assets/rails.png"`
Copy link
Member

Choose a reason for hiding this comment

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

The idea of this line is to tell that the call of asset-path("rails.png") will generate that string. So maybe we should change becomes with something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe something like is output as ? I suggested the change because I mis-understood "becomes" when I converted one of my rails projects to use the asset pipeline.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe returns would be better for this case since we are talking about the method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, returns sounds good to me.

Copy link
Member

Choose a reason for hiding this comment

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

Cool! Could you update the patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just did. Do you think I should also update this from my PR rails/rails#21143 for the Rails Asset Pipeline guide? Readers might be confused otherwise.

Copy link
Member

Choose a reason for hiding this comment

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

👍. Please do.

@rafaelfranca
Copy link
Member

Thank you for the PR.

@matthewd
Copy link
Member

matthewd commented Aug 7, 2015

rails/rails#21143

rafaelfranca added a commit that referenced this pull request Aug 11, 2015
[ci skip] Correct docs for asset helpers
@rafaelfranca rafaelfranca merged commit 7f4240e into rails:master Aug 11, 2015
rafaelfranca added a commit that referenced this pull request Sep 3, 2015
[ci skip] Correct docs for asset helpers
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