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

Flexible Entity #83

Closed
wants to merge 2 commits into from
Closed

Flexible Entity #83

wants to merge 2 commits into from

Conversation

jeromegn
Copy link
Contributor

@jeromegn jeromegn commented Feb 4, 2014

This parses the entity names to be more meaningful and support multiple nested module and class names.

One of the fun things of Grape::Entity is that it'll apply itself automatically when you use present if a class has an Entity like:

class User::Entity << Grape::Entity
  # expose...
end

That, in grape-swagger will return an Entity of type "Entity" which isn't really useful. With the changes, it returns "User".

Also:

class Some::Thing::Entity << Grape::Entity
  # expose...
end

Would return "Some::Thing". Far better, no? (instead of "Entity")

I took the liberty of adding an extra test for this.

@tim-vandecasteele
Copy link
Contributor

Thanks for the fix, merged.

@jeromegn jeromegn deleted the flex-entities branch February 4, 2014 13:25
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