forked from doorkeeper-gem/doorkeeper
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get Mongoid working by aliasing update_attribute with update_column o…
…n Revocable models. May want to refactor to a more ActiveRecord/Mongoid neutral approach in the future.
- Loading branch information
1 parent
ebc5854
commit db2f361
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Doorkeeper | ||
module Models | ||
module Mongoid | ||
module Revocable | ||
def self.included(base) | ||
base.class_eval do | ||
def update_column(attr, val) | ||
update_attribute attr, val | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |