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

Unexpected token for method name #233

Open
coorasse opened this issue Sep 5, 2022 · 2 comments
Open

Unexpected token for method name #233

coorasse opened this issue Sep 5, 2022 · 2 comments

Comments

@coorasse
Copy link

coorasse commented Sep 5, 2022

After installing the gem and running it in my project, I get:

CleanShot 2022-09-05 at 15 48 23@2x

I don't have further indications on where the error happened and how to solve it.

@billmers
Copy link

Same issue here. Happy to help provide more information but unsure what would help.

@billmers
Copy link

billmers commented Nov 2, 2022

I found the cause of the issue. It's occurring with enums that have special characters (slashes or spaces, in my case) in the keys. For example, an ActiveRecord model with this enum will trigger the error:

  enum timezone: {
    'America/Los_Angeles': 'America/Los_Angeles',
    'America/Denver': 'America/Denver',
    'America/Chicago': 'America/Chicago',
    'America/New_York': 'America/New_York'
  }

@pocke any chance we could get a fix for this? Thanks!

tk0miya added a commit to tk0miya/rbs_rails that referenced this issue Nov 11, 2024
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

2 participants