Permalink
Browse files

fixing ability generator

  • Loading branch information...
1 parent 6c1d685 commit 0442634d5aadc2b83cd432eba6e6ce25438b0cbd @ryanb committed Sep 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/generators/cancan/ability/ability_generator.rb
@@ -5,7 +5,7 @@ class AbilityGenerator < Rails::Generators::Base
def generate_ability
copy_file "ability.rb", "app/models/ability.rb"
- if File.exist?(destination_path("spec"))
+ if File.exist?(File.join(destination_root, "spec"))
copy_file "ability_spec.rb", "spec/models/ability_spec.rb"
else
copy_file "ability_test.rb", "test/unit/ability_test.rb"

0 comments on commit 0442634

Please sign in to comment.