Skip to content

Teach generator to respect namespaces #98

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

Merged
merged 2 commits into from
Mar 7, 2019

Conversation

alsemyonov
Copy link
Contributor

@alsemyonov alsemyonov commented Oct 24, 2018

Fixes the issue with namespaced models.

rails generate jsonapi:serializable Blog::Post

Before:

  1. generates app/serializables/blog/serializable_post.rb file with SerializableBlog::Post class inside.
  2. produces type 'blog/posts'

After:

  1. generates app/serializables/blog/serializable_post.rb file with Blog::SerializablePost class inside.
  2. produces type 'blog_posts'

@alsemyonov alsemyonov changed the title Teach generator respect namespaces Teach generator to respect namespaces Oct 25, 2018
@dawidof dawidof merged commit ed93270 into jsonapi-rb:master Mar 7, 2019
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