<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,6 +16,8 @@ module NoamBenAri
           &lt;% end %&gt;
           include NoamBenAri::Acts::Permissible::InstanceMethods
           extend NoamBenAri::Acts::Permissible::SingletonMethods
+          
+          alias_method :full_permissions_hash, :permissions_hash
         end
       end
       
@@ -37,8 +39,15 @@ module NoamBenAri
       module InstanceMethods
         
         # returns permissions in hash form
+        # from all levels recursively
         def permissions_hash
-          @permissions_hash ||= &lt;%= table_name %&gt;.inject({}) { |hsh,perm| hsh.merge(perm.to_hash) }.symbolize_keys!
+          @permissions_hash ||= lambda do
+            @permissions_hash = &lt;%= table_name %&gt;.inject({}) { |hsh,perm| hsh.merge(perm.to_hash) }.symbolize_keys!
+            &lt;%= role_model_file_name %&gt;s.each do |&lt;%= role_model_file_name %&gt;|
+              merge_permissions!(&lt;%= role_model_file_name %&gt;.permissions_hash)
+            end
+            @permissions_hash
+          end.call()
         end
         
         # accepts a permission identifier string or an array of permission identifier strings
@@ -83,14 +92,7 @@ module NoamBenAri
         def in_any_&lt;%= role_model_file_name %&gt;?(*&lt;%= role_model_file_name %&gt;_names)
           &lt;%= role_model_file_name %&gt;_names.any? {|&lt;%= role_model_file_name %&gt;| &lt;%= role_model_file_name %&gt;s_list.include?(&lt;%= role_model_file_name %&gt;) }
         end
-        
-        def full_permissions_hash
-          permissions_hash
-          &lt;%= role_model_file_name.pluralize %&gt;.each do |&lt;%= role_model_file_name %&gt;|
-            merge_permissions!(&lt;%= role_model_file_name %&gt;.full_permissions_hash)
-          end
-          permissions_hash
-        end
+
         &lt;% end %&gt;
         private
         # Nilifies permissions_hash instance variable.</diff>
      <filename>generators/permissible/templates/acts_as_permissible.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>881e94bf0dab4481b4805ae4454bde4b1e07d707</id>
    </parent>
  </parents>
  <author>
    <name>Noam Ben-Ari</name>
    <email>nbenari@gmail.com</email>
  </author>
  <url>http://github.com/NoamB/acts_as_permissible/commit/a3f25487398f59ef12f43f28d77fe1cda6812e80</url>
  <id>a3f25487398f59ef12f43f28d77fe1cda6812e80</id>
  <committed-date>2008-07-25T05:00:29-07:00</committed-date>
  <authored-date>2008-07-25T05:00:29-07:00</authored-date>
  <message>fixed problem with permissions_hash behaving differently whether full_permissions_hash was called or not. Thanks to Leonardo Mateo.</message>
  <tree>84a8e0134f7708631dbe619e7255ce7313df447a</tree>
  <committer>
    <name>Noam Ben-Ari</name>
    <email>nbenari@gmail.com</email>
  </committer>
</commit>
