prey / gdpr_rails

Rails Engine for the GDPR compliance
https://preyproject.com
MIT License
626 stars 62 forks source link

undefined local variable or method `acts_as_messageable' #28

Open atulbishtZig opened 6 years ago

atulbishtZig commented 6 years ago

The error arises when User model is configured with Mailboxer gem and it say's acts_as_messageable is undefined. I tried to add acts_as_messageable method inside module PolicyManager::Concerns::UserBehavior but still error shows up. In model user.rb:

class User < ApplicationRecord

  # Include default devise modules.
  devise :database_authenticatable, :registerable,
          :recoverable, :rememberable, :trackable, :validatable,
          :confirmable   #, :omniauthable  #,:token_authenticatable
  include DeviseTokenAuth::Concerns::User

  include PolicyManager::Concerns::UserBehavior  #policy management

  acts_as_messageable
end

In gem PolicyManager::Concerns::UserBehavior

module PolicyManager::Concerns::UserBehavior
  extend ActiveSupport::Concern
  module ActiveRecordExtension
    def acts_as_messageable
   #code
    end
  end