Skip to content

undefined local variable or method `acts_as_messageable'  #28

@atulbishtZig

Description

@atulbishtZig

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions