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.
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 underapp/models
completely shadowed the gem model.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. Theinvite.rb
file could be created by the generator. WDYT?I would be more than happy to create a PR for this.