Load datamapper class methods via append_extensions.
This relaxes the previous requirement that cancan has to be loaded before any models are. append_extensions will apply to all previously loaded models as well as ones loaded after.
This commit is contained in:
parent
8f815c422a
commit
ccd7a94d40
|
@ -31,6 +31,4 @@ module CanCan
|
||||||
end # module ModelAdapters
|
end # module ModelAdapters
|
||||||
end # module CanCan
|
end # module CanCan
|
||||||
|
|
||||||
DataMapper::Model.class_eval do
|
DataMapper::Model.append_extensions(CanCan::ModelAdditions::ClassMethods)
|
||||||
include CanCan::ModelAdditions::ClassMethods
|
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user