fix for problem of CanCan not working correctly in Rails 4