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 coupon code placeholder value. #3009

Conversation

bitberry-dev
Copy link

Hello!

<%= form.text_field :coupon_code, placeholder: :coupon_code %>

This is not valid code

You probably thought i18n would be used, but it’s not. Rails cast it to string and renders at it is.
Placeholder attribute can be string or true. If it is true then rails use human attribute name for order#coupon_code. FYI: https://stackoverflow.com/questions/25677031/how-do-i-translate-placeholder-text-in-rails-4

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@ericsaupe ericsaupe left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks!

@jacobherrington jacobherrington merged commit 6793ac3 into solidusio:master Dec 20, 2018
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.

4 participants