Is it possible to define abilities in separate file and include them in ability.rb file inside initialize method ?
belowed code returns: tried and got: undefined method 'can'
ability.rb
def initialize(user)
include MyExtension::Something::CustomAbilities
...
end
lib/my_extension/something.rb
module MyExtension::Something
module CustomAbilities
can :do_it, Project do |project|
check_something_here and return true or false...
end
end
end
perfect solution, if possible, would be to extend class Ability with Ability.send :include/extend, so without explicit include in initialize method