lib/avo/base_resource.rb in avo-0.5.0.beta11 vs lib/avo/base_resource.rb in avo-0.5.0.beta12

- old
+ new

@@ -236,16 +236,16 @@ def file_hash content_to_be_hashed = "" # resource file hash - resource_path = Rails.root.join("app", "avo", "resources", "#{name.underscore}.rb").to_s + resource_path = Rails.root.join("app", "avo", "resources", "#{self.class.name.underscore}_resource.rb").to_s if File.file? resource_path content_to_be_hashed += File.read(resource_path) end # policy file hash - policy_path = Rails.root.join("app", "policies", "#{name.underscore}_policy.rb").to_s + policy_path = Rails.root.join("app", "policies", "#{self.class.name.underscore.gsub("_resource", "")}_policy.rb").to_s if File.file? policy_path content_to_be_hashed += File.read(policy_path) end Digest::MD5.hexdigest(content_to_be_hashed)