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

ArgumentError if the monetized attribute name contains hyphens #699

Open
afdev82 opened this issue May 15, 2024 · 0 comments
Open

ArgumentError if the monetized attribute name contains hyphens #699

afdev82 opened this issue May 15, 2024 · 0 comments

Comments

@afdev82
Copy link
Contributor

afdev82 commented May 15, 2024

Hi all,

while trying to add a monetized attribute called 'custom_frame-price', I was getting the following error:

ArgumentError (Model already has a monetized attribute called 'custom_frame-price')

The error was misleading, I didn't understand why for a couple of hours, the reason was another error that was thrown before and it was not visible in the browser (only the last one was visible):

NameError (invalid attribute name `custom_frame-price_money_before_type_cast'):

I have tried then to rename the attribute without the hyphen and it worked.
Should we add a warning in the README about that? Something like "WARNING: Do not use hyphens in the name of the attribute"?
I am using them in my application, in Ruby/Rails is a valid name.

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

No branches or pull requests

1 participant