Skip to content
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

Fix "Hello Erb" example error #1386

Merged
merged 2 commits into from
Mar 27, 2018
Merged

Conversation

mdesantis
Copy link
Contributor

Fix #1382

// Run this example by adding <%= javascript_pack_tag 'hello_erb' %> to the head of your layout file,
// like app/views/layouts/application.html.erb.
// Run this example by adding <%%= javascript_pack_tag 'hello_erb' %> to the head of your layout file,
// like app/views/layouts/application.html.erb. Please take care of removing the extra `%` from `<%%=`:
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO there is no need for that extra line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which line do you mean? This one? // we can't write the correct ERB tags here, they would get interpreted.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was referring to Please take care of removing the extra %from<%%=: // we can't write the correct ERB tags here, they would get interpreted.

I assume dev will just copy <%%= javascript_pack_tag 'hello_erb' %> and use it. But that's just an opinion.

cc @gauravtiwari

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, yes but <%%= javascript_pack_tag 'hello_erb' %> doesn't work as it is, you must use <%= javascript_pack_tag 'hello_erb' %>; it's a hint for the user.

@gauravtiwari
Copy link
Member

Is that any better?

@mdesantis
Copy link
Contributor Author

Much better than mine for sure

@gauravtiwari gauravtiwari merged commit f94de19 into rails:master Mar 27, 2018
gauravtiwari pushed a commit that referenced this pull request Apr 29, 2018
@jakeNiemiec jakeNiemiec mentioned this pull request Mar 24, 2020
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