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 only_recursion_depth option failure when used from rake erd task #266

Closed
wants to merge 2 commits into from

Conversation

leapingfrogs
Copy link
Contributor

By default the value of only_recursion_depth is converted to a symbol.
This then fails to convert to an integer in RailsERD::diagram.generate.

This change fixes the issue by converting the option value to an int if
it only contains digits.

By default the value of only_recursion_depth is converted to a symbol.
This then fails to convert to an integer in RailsERD::diagram.generate.

This change fixes the issue by converting the option value to an int if
it only contains digits.
@kerrizor
Copy link
Collaborator

kerrizor commented Jun 6, 2017

This looks ok; is there a test we could add to ensure we don't regress?

…symbols.

In a similar way to the current tests that verify boolean values are
set in the model as booleans, this asserts that a string of only digits
will be set in the model as the integer value rather than a symbol.
@leapingfrogs
Copy link
Contributor Author

@kerrizor - I added that test to hopefully avoid regressing. Let me know if there's more you'd like adding to this.

@kerrizor
Copy link
Collaborator

Thank you for your patience.. this gets into the issue around the CLI/rake logic split that we need to undo (#289) but I'm tagging this for v1.6 release

@kerrizor kerrizor added this to the v1.6.0 milestone Jan 10, 2018
@kerrizor kerrizor mentioned this pull request May 10, 2019
kerrizor added a commit that referenced this pull request May 10, 2019
@kerrizor
Copy link
Collaborator

Closing in favor of a rebased version in #324

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.

None yet

2 participants