<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">83</assigned-user-id>
  <attachments-count type="integer">3</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-05-31T11:22:36+01:00</created-at>
  <creator-id type="integer">21796</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">285</number>
  <permalink>alias_method_chain-limits-extensibility</permalink>
  <priority type="integer">16048</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>wontfix</state>
  <tag>activesupport alias_method_chain patch</tag>
  <title>alias_method_chain limits extensibility</title>
  <updated-at type="datetime">2009-02-06T20:57:12+00:00</updated-at>
  <user-id type="integer">4065</user-id>
  <user-name>Gaspard Bucher</user-name>
  <creator-name>Tammo Freese</creator-name>
  <assigned-user-name>DHH</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
  <original-body>There are two problems with the current implementaton of alias_method_chain.

1) If a method defined in a superclass is aliased, replacing the method in the superclass has no effect:

class A
  def foo; &quot;foo&quot; end
end
class B &lt; A
  def foo_with_bar; foo_without_bar + &quot; with bar&quot; end
  alias_method_chain :foo, :bar
end
class A
  def foo; &quot;new foo&quot; end
end
B.new.foo # =&gt; &quot;foo with bar&quot;

I would have expected &quot;new foo with bar&quot;


2) While ..._without_... methods can be replaced, replacing ..._with_... methods has no effect: 

u = User.find(:first)
u.save # =&gt; true
class ActiveRecord::Base
  def save_with_validation
     raise
  end
end
u.save # =&gt; true

I would have expected an exception.

I have attached a patch that fixes both problems.</original-body>
  <latest-body>There are two problems with the current implementaton of alias_method_chain.

1) If a method defined in a superclass is aliased, replacing the method in the superclass has no effect:

class A
  def foo; &quot;foo&quot; end
end
class B &lt; A
  def foo_with_bar; foo_without_bar + &quot; with bar&quot; end
  alias_method_chain :foo, :bar
end
class A
  def foo; &quot;new foo&quot; end
end
B.new.foo # =&gt; &quot;foo with bar&quot;

I would have expected &quot;new foo with bar&quot;


2) While ..._without_... methods can be replaced, replacing ..._with_... methods has no effect: 

u = User.find(:first)
u.save # =&gt; true
class ActiveRecord::Base
  def save_with_validation
     raise
  end
end
u.save # =&gt; true

I would have expected an exception.

I have attached a patch that fixes both problems.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;
There are two problems with the current implementaton of alias_method_chain.
&lt;/p&gt;&lt;p&gt;
1) If a method defined in a superclass is aliased, replacing the method in the superclass has no effect:
&lt;/p&gt;&lt;p&gt;
class A
&lt;/p&gt;&lt;p&gt;
def foo; &quot;foo&quot; end
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
class B &amp;lt; A
&lt;/p&gt;&lt;p&gt;
def foo_with_bar; foo_without_bar + &quot; with bar&quot; end
&lt;/p&gt;&lt;p&gt;
alias_method_chain :foo, :bar
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
class A
&lt;/p&gt;&lt;p&gt;
def foo; &quot;new foo&quot; end
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
B.new.foo # =&gt; &quot;foo with bar&quot;
&lt;/p&gt;&lt;p&gt;
I would have expected &quot;new foo with bar&quot;
&lt;/p&gt;&lt;p&gt;
2) While ...&lt;em&gt;without&lt;/em&gt;... methods can be replaced, replacing ...&lt;em&gt;with&lt;/em&gt;... methods has no effect:
&lt;/p&gt;&lt;p&gt;
u = User.find(:first)
&lt;/p&gt;&lt;p&gt;
u.save # =&gt; true
&lt;/p&gt;&lt;p&gt;
class ActiveRecord::Base
&lt;/p&gt;&lt;p&gt;
def save_with_validation
&lt;/p&gt;&lt;p&gt;
raise
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
u.save # =&gt; true
&lt;/p&gt;&lt;p&gt;
I would have expected an exception.
&lt;/p&gt;&lt;p&gt;
I have attached a patch that fixes both problems.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>There are two problems with the current implementaton of alias_method_chain.

1) If a method defined in a superclass is aliased, replacing the method in the superclass has no effect:

class A
  def foo; &quot;foo&quot; end
end
class B &lt; A
  def foo_with_bar; foo_without_bar + &quot; with bar&quot; end
  alias_method_chain :foo, :bar
end
class A
  def foo; &quot;new foo&quot; end
end
B.new.foo # =&gt; &quot;foo with bar&quot;

I would have expected &quot;new foo with bar&quot;


2) While ..._without_... methods can be replaced, replacing ..._with_... methods has no effect: 

u = User.find(:first)
u.save # =&gt; true
class ActiveRecord::Base
  def save_with_validation
     raise
  end
end
u.save # =&gt; true

I would have expected an exception.

I have attached a patch that fixes both problems.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
There are two problems with the current implementaton of alias_method_chain.
&lt;/p&gt;&lt;p&gt;
1) If a method defined in a superclass is aliased, replacing the method in the superclass has no effect:
&lt;/p&gt;&lt;p&gt;
class A
&lt;/p&gt;&lt;p&gt;
def foo; &quot;foo&quot; end
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
class B &amp;lt; A
&lt;/p&gt;&lt;p&gt;
def foo_with_bar; foo_without_bar + &quot; with bar&quot; end
&lt;/p&gt;&lt;p&gt;
alias_method_chain :foo, :bar
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
class A
&lt;/p&gt;&lt;p&gt;
def foo; &quot;new foo&quot; end
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
B.new.foo # =&gt; &quot;foo with bar&quot;
&lt;/p&gt;&lt;p&gt;
I would have expected &quot;new foo with bar&quot;
&lt;/p&gt;&lt;p&gt;
2) While ...&lt;em&gt;without&lt;/em&gt;... methods can be replaced, replacing ...&lt;em&gt;with&lt;/em&gt;... methods has no effect:
&lt;/p&gt;&lt;p&gt;
u = User.find(:first)
&lt;/p&gt;&lt;p&gt;
u.save # =&gt; true
&lt;/p&gt;&lt;p&gt;
class ActiveRecord::Base
&lt;/p&gt;&lt;p&gt;
def save_with_validation
&lt;/p&gt;&lt;p&gt;
raise
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
u.save # =&gt; true
&lt;/p&gt;&lt;p&gt;
I would have expected an exception.
&lt;/p&gt;&lt;p&gt;
I have attached a patch that fixes both problems.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-05-31T11:22:36+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-05-31T11:22:36+01:00</updated-at>
      <user-id type="integer">21796</user-id>
      <user-name>Tammo Freese</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>alias_method_chain is just supposed to be a shortcut for two alias_method statements. Usecase like yours, deserves a solution of it's own.

Thanks.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
alias_method_chain is just supposed to be a shortcut for two alias_method statements. Usecase like yours, deserves a solution of it's own.
&lt;/p&gt;&lt;p&gt;
Thanks.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-07-11T22:57:17+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
:state: new
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>wontfix</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-07-11T22:57:17+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>In your opinion, is it OK that you cannot extend/override any of  
rails's ..._with_... methods?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
In your opinion, is it OK that you cannot extend/override any of
&lt;/p&gt;&lt;p&gt;
rails's ...&lt;em&gt;with&lt;/em&gt;... methods?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-07-11T23:40:07+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>wontfix</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-07-11T23:40:07+01:00</updated-at>
      <user-id type="integer">21796</user-id>
      <user-name>Tammo Freese</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>This seems to be a useful patch that addresses a real problem/limitation, so I'm +1. Plus, it's small and tested; Pratik, maybe you can reconsider?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
This seems to be a useful patch that addresses a real problem/limitation, so I'm +1. Plus, it's small and tested; Pratik, maybe you can reconsider?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-07-29T14:11:33+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>wontfix</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-07-29T14:11:33+01:00</updated-at>
      <user-id type="integer">19078</user-id>
      <user-name>Steve Purcell</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">424</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-07-29T14:15:32+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>wontfix</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-07-29T14:15:32+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>Joshua Peek</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">424</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>target_method_exists can use instance_method_defined?(false) instead.</body>
      <body-html>&lt;div&gt;&lt;p&gt;target_method_exists can use instance_method_defined?(false)
instead.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-04T16:13:32+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- 
:state: wontfix
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility-2</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-04T16:13:32+01:00</updated-at>
      <user-id type="integer">83</user-id>
      <user-name>DHH</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>Joshua Peek</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>-1 I don't like the idea of replacing the alias with a delegate method call.

@David I think that only cleans up the &quot;target_method_exists = (instance_methods + private_instance_methods).include?(RUBY_VERSION &lt; '1.9' ? with_method : with_method.to_sym)&quot; busy.</body>
      <body-html>&lt;div&gt;&lt;p&gt;-1 I don't like the idea of replacing the alias with a delegate
method call.&lt;/p&gt;
&lt;p&gt;@David I think that only cleans up the &quot;target_method_exists =
(instance_methods + private_instance_methods).include?(RUBY_VERSION
&amp;lt; '1.9' ? with_method : with_method.to_sym)&quot; busy.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-07T16:12:51+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 424
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-07T16:13:08+01:00</updated-at>
      <user-id type="integer">424</user-id>
      <user-name>Joshua Peek</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>The reason for this is to allow someone to overwrite part of the chain to inject their own behavior. Which I think is very reasonable. If you have another way of achieving the same result, let's discuss that.

Tammo, perhaps you can post the full example somewhere so Josh can see the use case? I didn't really care for this much until I saw the use case either.</body>
      <body-html>&lt;div&gt;&lt;p&gt;The reason for this is to allow someone to overwrite part of the
chain to inject their own behavior. Which I think is very
reasonable. If you have another way of achieving the same result,
let's discuss that.&lt;/p&gt;
&lt;p&gt;Tammo, perhaps you can post the full example somewhere so Josh
can see the use case? I didn't really care for this much until I
saw the use case either.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-07T19:22:45+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-07T19:22:59+01:00</updated-at>
      <user-id type="integer">83</user-id>
      <user-name>DHH</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Using alias_method instead of a delegate method call makes overwriting/ 
extending _with_ methods a major pain.

Let's say you would like to disable benchmarking, but keep the logger  
for the rest of the application
(or you would like to implement your own benchmarking).

The code

class ActionController::Base
   def perform_action_with_benchmark(*args, &amp;block)
      perform_action_without_benchmark(*args, &amp;block)
   end
end

looks right, but does not work, since overwriting _with_ methods has  
no effect at all.

It is possible to workaround that, but the resulting code

a) looks like an implementation error, and
b) depends on the exact order of the chaining in rails:

class ActionController::Base
   def perform_action_without_rescue(*args, &amp;block)
      perform_action_without_benchmark(*args, &amp;block)
   end
end</body>
      <body-html>&lt;div&gt;&lt;p&gt;Using alias_method instead of a delegate method call makes
overwriting/ extending &lt;em&gt;with&lt;/em&gt; methods a major pain.&lt;/p&gt;
&lt;p&gt;Let's say you would like to disable benchmarking, but keep the
logger for the rest of the application (or you would like to
implement your own benchmarking).&lt;/p&gt;
&lt;p&gt;The code&lt;/p&gt;
&lt;p&gt;class ActionController::Base def
perform_action_with_benchmark(*args, &amp;amp;block)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;  perform_action_without_benchmark(*args, &amp;amp;block)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end end&lt;/p&gt;
&lt;p&gt;looks right, but does not work, since overwriting &lt;em&gt;with&lt;/em&gt;
methods has no effect at all.&lt;/p&gt;
&lt;p&gt;It is possible to workaround that, but the resulting code&lt;/p&gt;
&lt;p&gt;a) looks like an implementation error, and b) depends on the
exact order of the chaining in rails:&lt;/p&gt;
&lt;p&gt;class ActionController::Base def
perform_action_without_rescue(*args, &amp;amp;block)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;  perform_action_without_benchmark(*args, &amp;amp;block)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end end&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-07T21:50:08+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-07T21:50:18+01:00</updated-at>
      <user-id type="integer">21796</user-id>
      <user-name>Tammo Freese</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>The use case seems reasonable. I wonder if aliasing it back works?

@@@ ruby
alias_method :perform_action, :perform_action_without_benchmark
@@@

I also think those (ActionController) mixins should be done without alias_method_chain. Another ticket for another day.</body>
      <body-html>&lt;div&gt;&lt;p&gt;The use case seems reasonable. I wonder if aliasing it back
works?&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
alias_method :perform_action, :perform_action_without_benchmark
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also think those (ActionController) mixins should be done
without alias_method_chain. Another ticket for another day.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-07T23:14:07+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-07T23:14:14+01:00</updated-at>
      <user-id type="integer">424</user-id>
      <user-name>Joshua Peek</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Hello Joshua,

aliasing back will not work correctly.
  
  alias_method :perform_action, :perform_action_without_benchmark

will disable benchmarking, 
but it will disable a lot more than that, since it throws out 
every aspect added to perform_action after benchmarking. 

In Rails 2.1, this would mean that
- rescue_from would not work anymore,
- action caching would not work anymore,
- every plugin extension to perform_action would be lost.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hello Joshua,&lt;/p&gt;
&lt;p&gt;aliasing back will not work correctly.&lt;/p&gt;
&lt;p&gt;alias_method :perform_action,
:perform_action_without_benchmark&lt;/p&gt;
&lt;p&gt;will disable benchmarking, but it will disable a lot more than
that, since it throws out every aspect added to perform_action
after benchmarking.&lt;/p&gt;
&lt;p&gt;In Rails 2.1, this would mean that - rescue_from would not work
anymore, - action caching would not work anymore, - every plugin
extension to perform_action would be lost.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-08T08:06:27+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-08T08:16:20+01:00</updated-at>
      <user-id type="integer">21796</user-id>
      <user-name>Tammo Freese</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Is swapping out ActionController benchmark your real goal, or was it just an example? If it is, I'd like to see how we can do this w/o alias_method_chain.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Is swapping out ActionController benchmark your real goal, or
was it just an example? If it is, I'd like to see how we can do
this w/o alias_method_chain.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-08T15:49:26+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-08T15:49:31+01:00</updated-at>
      <user-id type="integer">424</user-id>
      <user-name>Joshua Peek</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>We found the problem with &#8230;_with_&#8230; methods when implementing a custom  
benchmarking.

However, in my opinion, every &#8230;_with_&#8230; method in rails is a potential  
extension point for
an application or a plugin, and should therefore be extensible.</body>
      <body-html>&lt;div&gt;&lt;p&gt;We found the problem with &amp;#8230;&lt;em&gt;with&lt;/em&gt;&amp;#8230; methods
when implementing a custom benchmarking.&lt;/p&gt;
&lt;p&gt;However, in my opinion, every &amp;#8230;&lt;em&gt;with&lt;/em&gt;&amp;#8230; method
in rails is a potential extension point for an application or a
plugin, and should therefore be extensible.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-09T11:15:08+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-09T11:15:17+01:00</updated-at>
      <user-id type="integer">21796</user-id>
      <user-name>Tammo Freese</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Hi, 

I started a few blog posts on http://ruby.simapse.com about the decorator pattern and alias_method_chain. You might want to have a look.

Anyhow a suggested approach would be to move (almost?) all instance methods of ActiveRecord::Base into the module ActiveRecord::Core, and put the later on top of all decorating modules (Core makes sens since it's the one to be deCOREated).

Their would be no aliasing, the method_without_feature is replaced by super and voila, that's it.

I gave it a try on 'save' and all the tests (cases/base) passed. 

With/without methods are gone there's just one and only save (seems to me less messy when you have many decorators). 
If i want to save without transaction, i override save in : 

module AR::Transaction
 def save; super; end
end

Simple, easy, consistant and i don't think you loose any convinience alias_method_chain brings you, and it should break anything (or not much). I still have to dig in though.

Attached is my patch with save.

If you think it's worth the try i can go on and refactor it for every method exposed in AR::Base on a github fork.

cheers</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I started a few blog posts on &lt;a href=&quot;http://ruby.simapse.com&quot;&gt;http://ruby.simapse.com&lt;/a&gt; about the
decorator pattern and alias_method_chain. You might want to have a
look.&lt;/p&gt;
&lt;p&gt;Anyhow a suggested approach would be to move (almost?) all
instance methods of ActiveRecord::Base into the module
ActiveRecord::Core, and put the later on top of all decorating
modules (Core makes sens since it's the one to be deCOREated).&lt;/p&gt;
&lt;p&gt;Their would be no aliasing, the method_without_feature is
replaced by super and voila, that's it.&lt;/p&gt;
&lt;p&gt;I gave it a try on 'save' and all the tests (cases/base)
passed.&lt;/p&gt;
&lt;p&gt;With/without methods are gone there's just one and only save
(seems to me less messy when you have many decorators). If i want
to save without transaction, i override save in :&lt;/p&gt;
&lt;p&gt;module AR::Transaction def save; super; end end&lt;/p&gt;
&lt;p&gt;Simple, easy, consistant and i don't think you loose any
convinience alias_method_chain brings you, and it should break
anything (or not much). I still have to dig in though.&lt;/p&gt;
&lt;p&gt;Attached is my patch with save.&lt;/p&gt;
&lt;p&gt;If you think it's worth the try i can go on and refactor it for
every method exposed in AR::Base on a github fork.&lt;/p&gt;
&lt;p&gt;cheers&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-21T23:01:04+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: activesupport alias_method_chain patch
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-21T23:01:09+01:00</updated-at>
      <user-id type="integer">32634</user-id>
      <user-name>charly71</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>Hello charly71,


I see three problems with this approach:

1) To decorate one of the save methods in the modules (extending it, not overriding it) you would still need to resort to alias_method_chain or something similar. 

2) You lose the possiblity to call the with/without methods directly on the objects. (I can't tell for sure whether this is needed or not.)

3) You can only extend inside the module itself, but not inside classes or subclasses. As a result, you cannot restrict an extension to a subtree of the inheritance hierarchy, but it's always all or nothing. As an example, you cannot easily disable benchmarking for a single subclass of ActionController::Base, but
only globally.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hello charly71,&lt;/p&gt;
&lt;p&gt;I see three problems with this approach:&lt;/p&gt;
&lt;p&gt;1) To decorate one of the save methods in the modules (extending
it, not overriding it) you would still need to resort to
alias_method_chain or something similar.&lt;/p&gt;
&lt;p&gt;2) You lose the possiblity to call the with/without methods
directly on the objects. (I can't tell for sure whether this is
needed or not.)&lt;/p&gt;
&lt;p&gt;3) You can only extend inside the module itself, but not inside
classes or subclasses. As a result, you cannot restrict an
extension to a subtree of the inheritance hierarchy, but it's
always all or nothing. As an example, you cannot easily disable
benchmarking for a single subclass of ActionController::Base, but
only globally.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-25T16:12:00+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-25T16:12:03+01:00</updated-at>
      <user-id type="integer">21796</user-id>
      <user-name>Tammo Freese</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>Hi Tammo,

yes i got immediatly aware of no 3) after posting and felt stupid.

regarding no 2) the problem is when you call save_without_transaction, you're probably calling save_with_validation and save_with_dirty, and it is a bit misleading (you're not calling the pure, immaculate save...). Even though it is probably what you want, it doesn't give you more modularity (cherrypicking) than having a chain of 'super' called.

I do agree though that if you want to override (for just one model down the inheritance chain) your benchmarking or transaction or whatever you'll have to resolve to some magic (which still needs to be boiled in the pot) BUT..... only in your plugin :

module MyValidation
 skip :save, :in=&gt;Validation
 def save
  &quot;blah&quot;; super; &quot;blah&quot;
 end
end

Yet i'm speculating because i haven't resolved the magic piece ('super' is giving me some headaches, hum any ruby ninja around ?)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi Tammo,&lt;/p&gt;
&lt;p&gt;yes i got immediatly aware of no 3) after posting and felt
stupid.&lt;/p&gt;
&lt;p&gt;regarding no 2) the problem is when you call
save_without_transaction, you're probably calling
save_with_validation and save_with_dirty, and it is a bit
misleading (you're not calling the pure, immaculate save...). Even
though it is probably what you want, it doesn't give you more
modularity (cherrypicking) than having a chain of 'super'
called.&lt;/p&gt;
&lt;p&gt;I do agree though that if you want to override (for just one
model down the inheritance chain) your benchmarking or transaction
or whatever you'll have to resolve to some magic (which still needs
to be boiled in the pot) BUT..... only in your plugin :&lt;/p&gt;
&lt;p&gt;module MyValidation skip :save, :in=&amp;gt;Validation def save
&quot;blah&quot;; super; &quot;blah&quot; end end&lt;/p&gt;
&lt;p&gt;Yet i'm speculating because i haven't resolved the magic piece
('super' is giving me some headaches, hum any ruby ninja around
?)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-25T17:40:24+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-25T17:40:27+01:00</updated-at>
      <user-id type="integer">32634</user-id>
      <user-name>charly71</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>Hi again,

i hope i'm not polluting this ticket, but since Joshua said mixins in ActionController should be done without alias_method_chain...

Anyway the attached code says it all and adresses a lot of issues.

The uninclude file was taken from here :
 
http://github.com/yrashk/rbmodexcl/tree/master.

It is then easy to skip a module on the fly unincluding and reincluding. I'm not sure whats the drawbacks or limitations but it certainly opens up the possibilities.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;i hope i'm not polluting this ticket, but since Joshua said
mixins in ActionController should be done without
alias_method_chain...&lt;/p&gt;
&lt;p&gt;Anyway the attached code says it all and adresses a lot of
issues.&lt;/p&gt;
&lt;p&gt;The uninclude file was taken from here :&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/yrashk/rbmodexcl/tree/master.%3C/p&quot;&gt;http://github.com/yrashk/rbmodex...&lt;/a&gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;It is then easy to skip a module on the fly unincluding and
reincluding. I'm not sure whats the drawbacks or limitations but it
certainly opens up the possibilities.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-26T15:43:21+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-09-26T15:43:26+01:00</updated-at>
      <user-id type="integer">32634</user-id>
      <user-name>charly71</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>alias_method_chain makes easy AOP, while we need it more manageable, like &quot;insert new feature to specified position of the chain&quot;, &quot;rewrite/remove/move specified feature of the chain&quot;, &quot;call pure function&quot;, etc.
thus, chain should be exposed and can be operated, and features in it should be manageable. all of them are not only behaviours to be execute, but also data structures can be operated. 

big project? 

I think it makes sense. just a suggestion to core team to consider.

I even like it be in ruby grammar(I prefer ruby includes raw event-driven support, annotation support...) -- brainstorm :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;alias_method_chain makes easy AOP, while we need it more
manageable, like &quot;insert new feature to specified position of the
chain&quot;, &quot;rewrite/remove/move specified feature of the chain&quot;, &quot;call
pure function&quot;, etc. thus, chain should be exposed and can be
operated, and features in it should be manageable. all of them are
not only behaviours to be execute, but also data structures can be
operated.&lt;/p&gt;
&lt;p&gt;big project?&lt;/p&gt;
&lt;p&gt;I think it makes sense. just a suggestion to core team to
consider.&lt;/p&gt;
&lt;p&gt;I even like it be in ruby grammar(I prefer ruby includes raw
event-driven support, annotation support...) -- brainstorm :)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-07T03:47:47+01:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-10-07T03:47:48+01:00</updated-at>
      <user-id type="integer">31686</user-id>
      <user-name>sliu</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>finally, I find class Hook in merb's extlib fit my needs.

much appreciate to rails team who bring and maintain the amazing rails framework. 

I have a big dream: keep open mind to merge rails and merb community together.

rails and merb are now more like struts and webwork, they finally merged their projects and communities.

I think whether the dream can be realized primarily depends on not tech, not history. IT IS ALL ABOUT PEOPLE WHO OWE THEM.</body>
      <body-html>&lt;div&gt;&lt;p&gt;finally, I find class Hook in merb's extlib fit my needs.&lt;/p&gt;
&lt;p&gt;much appreciate to rails team who bring and maintain the amazing
rails framework.&lt;/p&gt;
&lt;p&gt;I have a big dream: keep open mind to merge rails and merb
community together.&lt;/p&gt;
&lt;p&gt;rails and merb are now more like struts and webwork, they
finally merged their projects and communities.&lt;/p&gt;
&lt;p&gt;I think whether the dream can be realized primarily depends on
not tech, not history. IT IS ALL ABOUT PEOPLE WHO OWE THEM.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-11-17T07:09:54+00:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2008-11-17T07:09:58+00:00</updated-at>
      <user-id type="integer">31686</user-id>
      <user-name>sliu</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>Yehuda is out to kill alias_method_chain. Expect it to be gone in 3.0 ;)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Yehuda is out to kill alias_method_chain. Expect it to be gone
in 3.0 ;)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-01-19T19:14:20+00:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- 
:state: open
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>wontfix</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2009-01-19T19:14:23+00:00</updated-at>
      <user-id type="integer">424</user-id>
      <user-name>Joshua Peek</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">83</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>Good to know Yehuda is on this. This method chaining has always been hard to adapt or debug.

I am very curious to know what he comes up with !</body>
      <body-html>&lt;div&gt;&lt;p&gt;Good to know Yehuda is on this. This method chaining has always
been hard to adapt or debug.&lt;/p&gt;
&lt;p&gt;I am very curious to know what he comes up with !&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-06T20:57:11+00:00</created-at>
      <creator-id type="integer">21796</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">285</number>
      <permalink>alias_method_chain-limits-extensibility</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>wontfix</state>
      <tag>activesupport alias_method_chain patch</tag>
      <title>alias_method_chain limits extensibility</title>
      <updated-at type="datetime">2009-02-06T20:57:12+00:00</updated-at>
      <user-id type="integer">4065</user-id>
      <user-name>Gaspard Bucher</user-name>
      <creator-name>Tammo Freese</creator-name>
      <assigned-user-name>DHH</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/285</url>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>47d73219f3ebcd99b82dad8a0a45dce5d21317b4</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2008-05-31T11:22:36+01:00</created-at>
      <filename>fixes-for-alias-method-chain.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">25262</id>
      <size type="integer">4759</size>
      <uploader-id type="integer">21796</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/25262/fixes-for-alias-method-chain.diff</url>
    </attachment>
    <attachment type="Attachment">
      <code>2d90a594ee55fbe5645100d6d9a2f35e6f8a23e5</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2008-09-21T23:01:05+01:00</created-at>
      <filename>rails_without_alias_method_chain_.txt</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">47507</id>
      <size type="integer">5668</size>
      <uploader-id type="integer">32634</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/47507/rails_without_alias_method_chain_.txt</url>
    </attachment>
    <attachment type="Attachment">
      <code>3f3b40a15e0f554932f3ee74d7a2a883ecf41ec0</code>
      <content-type>application/octet-stream</content-type>
      <created-at type="datetime">2008-09-26T15:43:21+01:00</created-at>
      <filename>model-decorator-overide.rb</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">48899</id>
      <size type="integer">918</size>
      <uploader-id type="integer">32634</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/48899/model-decorator-overide.rb</url>
    </attachment>
  </attachments>
</ticket>
