<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
    <added>
      <filename>test/log/.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -6,9 +6,9 @@ module SimplesIdeias
       base.send :extend, ClassMethods
       
       # setting attribute
-      base.write_inheritable_attribute  :has_layout_options, []
-      base.class_inheritable_reader     :has_layout_options
-      
+      base.class_inheritable_accessor :has_layout_options
+      base.has_layout_options = []
+
       # define plugin before_filter
       base.before_filter :choose_layout
     end
@@ -26,6 +26,9 @@ module SimplesIdeias
     module InstanceMethods
       private
         def choose_layout
+          # set default layout to application
+          self.class.write_inheritable_attribute(&quot;layout&quot;, &quot;application&quot;)
+          
           # set class attribute as local
           has_layout_options = self.class.has_layout_options
           
@@ -36,8 +39,7 @@ module SimplesIdeias
             name, options = config
             
             # just process options if is not nil;
-            # maybe somebody used has_layout method instead of
-            # layout
+            # maybe somebody used has_layout method instead of layout
             unless options.nil?
               # process :except and :only options
               if actions = options[:only]
@@ -74,10 +76,11 @@ module SimplesIdeias
             
             self.class.layout(layout_name) if layout_name
           
-            # if options hasn't been set, continue to the
-            # next rule
+            # if options hasn't been set, continue to the next rule
             break if layout_name &amp;&amp; !options.nil?
           end
+          
+          self.class.write_inheritable_attribute(&quot;layout&quot;, &quot;application&quot;) unless self.class.read_inheritable_attribute(&quot;layout&quot;)
         end
         
         def has_layout_execute_callback(callback)</diff>
      <filename>lib/has_layout.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 class PostsController &lt; ApplicationController
-  has_layout 'special', :only =&gt; %w(index)
-  has_layout 'admin',   :only =&gt; :edit, :if =&gt; proc{|c| c.action_name == 'edit' }
-  has_layout 'site',    :except =&gt; %w(index), :unless =&gt; :action_name_is_follow?
+  has_layout &quot;special&quot;, :only =&gt; %w(index)
+  has_layout &quot;admin&quot;,   :only =&gt; :edit, :if =&gt; proc{|c| c.action_name == &quot;edit&quot; }
+  has_layout &quot;site&quot;,    :except =&gt; %w(index), :unless =&gt; :action_name_is_follow?
   
   def index
   end
@@ -20,6 +20,6 @@ class PostsController &lt; ApplicationController
   
   private
     def action_name_is_follow?
-      action_name != 'follow'
+      action_name != &quot;follow&quot;
     end
 end</diff>
      <filename>test/app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,24 @@
-require 'test_helper'
-
+require &quot;test_helper&quot;
+RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
 class PostsControllerTest &lt; ActionController::TestCase
   def test_should_use_special_layout_with_only_option
     get :index
-    assert_layout 'special'
+    assert_layout &quot;special&quot;
   end
   
   def test_should_use_admin_layout_with_only_option_and_if_using_proc
     get :edit
-    assert_layout 'admin'
+    assert_layout &quot;admin&quot;
   end
   
   def test_should_use_site_layout_with_except_option_and_unless_using_symbol
     get :follow
-    assert_layout 'site'
+    assert_layout &quot;site&quot;
   end
   
   def test_should_use_application_layout
     get :comments
-    assert_layout 'application'
+    assert_layout &quot;application&quot;
   end
   
   private</diff>
      <filename>test/test/functional/posts_controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
 require File.expand_path(File.dirname(__FILE__) + &quot;/../config/environment&quot;)
-require 'test_help'
+require &quot;test_help&quot;
 
 class Test::Unit::TestCase
   # Transactional fixtures accelerate your tests by wrapping each test method</diff>
      <filename>test/test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/log/development.log</filename>
    </removed>
    <removed>
      <filename>test/log/production.log</filename>
    </removed>
    <removed>
      <filename>test/log/server.log</filename>
    </removed>
    <removed>
      <filename>test/log/test.log</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>2646b4d02c4d61b4b0c1a873fbb19b475770abb4</id>
    </parent>
  </parents>
  <author>
    <name>Nando Vieira</name>
    <email>fnando.vieira@gmail.com</email>
  </author>
  <url>http://github.com/fnando/has_layout/commit/e03ada8f08a4a4216e32cd91f06eab7cc7d104f4</url>
  <id>e03ada8f08a4a4216e32cd91f06eab7cc7d104f4</id>
  <committed-date>2009-03-18T12:32:35-07:00</committed-date>
  <authored-date>2009-03-18T12:32:35-07:00</authored-date>
  <message>Bug fix: an action without configuration was inheriting the last applied layout.</message>
  <tree>106b0ee45f117c7e8f6dd89b38715df8d377ad29</tree>
  <committer>
    <name>Nando Vieira</name>
    <email>fnando.vieira@gmail.com</email>
  </committer>
</commit>
