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

undefined local variable or method `acts_as_messageable' #28

Open
atulbishtZig opened this issue Aug 7, 2018 · 0 comments
Open

undefined local variable or method `acts_as_messageable' #28

atulbishtZig opened this issue Aug 7, 2018 · 0 comments

Comments

@atulbishtZig
Copy link

atulbishtZig commented Aug 7, 2018

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
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