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

Add option to specify package path for models #347

Merged
merged 3 commits into from
Mar 3, 2019
Merged

Add option to specify package path for models #347

merged 3 commits into from
Mar 3, 2019

Conversation

kevinmcconnell
Copy link
Contributor

@kevinmcconnell kevinmcconnell commented Feb 10, 2019

This adds a new --models-path option to soda generate model that allows changing where the model will be created. The package name will be the last folder in the path.

For example:

soda generate model User --models-path models/admin

...would create the model files in ./models/admin, and make them part of the admin package.

This addresses #16 (which I found after discovering I wanted this feature for myself :) )

@kevinmcconnell kevinmcconnell requested a review from a team as a code owner February 10, 2019 20:11
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Found some fixes!

P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).

@stanislas-m stanislas-m self-assigned this Feb 11, 2019
@kevinmcconnell
Copy link
Contributor Author

@stanislas-m any thoughts on this PR? Thanks!

@stanislas-m
Copy link
Member

@kevinmcconnell It's on my todo list, I just didn't had the time to review it properly. :)

@kevinmcconnell
Copy link
Contributor Author

@stanislas-m no worries, just thought I'd check :)

soda/cmd/generate/model_cmd.go Outdated Show resolved Hide resolved
This adds a new `--models-path` option to `soda generate model` that
allows changing where the model will be created.  The package name will
be the last folder in the path.

For example:

    soda generate model User --models-path models/admin

...would create the model files in `./models/admin`, and make them part
of the `admin` package.
@kevinmcconnell
Copy link
Contributor Author

@stanislas-m that's updated now, per your feedback. Cheers.

@stanislas-m stanislas-m added this to the v4.10.0 milestone Mar 2, 2019
@stanislas-m stanislas-m self-requested a review March 2, 2019 10:53
@stanislas-m stanislas-m merged commit 91e62fd into gobuffalo:development Mar 3, 2019
@stanislas-m
Copy link
Member

Thanks for your patience!

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.

2 participants