Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/easy_roles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ module EasyRoles
extend ActiveSupport::Concern

included do |base|
base.send :alias_method_chain, :method_missing, :roles
base.send :alias_method_chain, :respond_to?, :roles
base.class_eval do
alias_method :method_missing_without_roles, :method_missing
alias_method :method_missing, :method_missing_with_roles
alias_method :respond_to_without_roles?, :respond_to?
alias_method :respond_to?, :respond_to_with_roles?
end
end

ALLOWED_METHODS = [:serialize, :bitmask]
Expand Down