# How do I call "super" if I over-ride a plugins method?

**URL:** <https://www.ruby-forum.com/t/how-do-i-call-super-if-i-over-ride-a-plugins-method/149091>\
**Category:** Rails\
**Created:** [September 20, 2008, 7:50am UTC](https://www.ruby-forum.com/t/how-do-i-call-super-if-i-over-ride-a-plugins-method/149091 "2008-09-20T07:50:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [September 20, 2008, 7:50am UTC](https://www.ruby-forum.com/t/how-do-i-call-super-if-i-over-ride-a-plugins-method/149091/1 "2008-09-20T07:50:44Z")

</div>

Hi,

I want to override a method in a plugin (which itself is a method that  
when the plugin loads adds them via a mixin technique).

I want to add a blank copy of this method outside the plugin (say in  
/lib/xx\_extns.rb), HOWEVER how do I in my method call the plugin  
method first before doing my stuff?

Super, doesn’t work as I’m not sub-classing.,

Thanks in advance

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [September 20, 2008, 8:53am UTC](https://www.ruby-forum.com/t/how-do-i-call-super-if-i-over-ride-a-plugins-method/149091/2 "2008-09-20T08:53:53Z")

</div>

On Sep 20, 1:50 pm, “Greg H.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Thanks in advance

You chain the method by calling alias\_method before “overriding” it.  
You then call the name of the “aliased” method from your method.
