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

Use a concern instead of a class so that Invite model can be easily extended in projects #24

Open
00dav00 opened this issue Nov 1, 2018 · 0 comments

Comments

@00dav00
Copy link

00dav00 commented Nov 1, 2018

Today I was in the need of extending Invite class in a project using the gem. After some time looking into the options I did some dirty trick to monkey patch the invite class cause just creating a file under app/models completely shadowed the gem model.

require "#{Gem.loaded_specs['invitation'].full_gem_path}/app/models/invite.rb"

 class Invite
   # Custom code here
end

I think it would be useful for the Invite model to be in the project itself and use a concern to add the required behavior, so that it can be extended when the project needs it. The invite.rb file could be created by the generator. WDYT?

I would be more than happy to create a PR for this.

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

1 participant