# Rails Plugins: Why to register your own functionality with s

**URL:** <https://www.ruby-forum.com/t/rails-plugins-why-to-register-your-own-functionality-with-s/55941>\
**Category:** Rails\
**Created:** [March 25, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/rails-plugins-why-to-register-your-own-functionality-with-s/55941 "2006-03-25T16:52:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariano\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eada6e/32.png) [@Mariano\_K](https://www.ruby-forum.com/u/Mariano_K)\
**Post date:** [March 25, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/rails-plugins-why-to-register-your-own-functionality-with-s/55941/1 "2006-03-25T16:52:58Z")

</div>

Hi there,

I have seen in the file column plugin (  
[http://www.kanthak.net/opensource/file\_column/](http://www.kanthak.net/opensource/file_column/)) from Sebastian K.  
or  
David’s acts\_as\_taggable plugin that to register my functionality I need  
to  
do something like this:

ApplicationHelper.send(:include, InPlaceEditAssociations)

I am wondering why not:

(a)  
module ApplicationHelper  
include InPlaceEditAssociatons  
end

or:

(b)  
ApplicationHelper.include(InPlaceEditAssociations)

As I now know a way that works this is not crucial to me, but I am still  
curious.

Cheers,  
Mariano

---

<div class="post-metadata">

**Author:** ![Mariano\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eada6e/32.png) [@Mariano\_K](https://www.ruby-forum.com/u/Mariano_K)\
**Post date:** [March 25, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/rails-plugins-why-to-register-your-own-functionality-with-s/55941/2 "2006-03-25T17:15:55Z")

</div>

Grmpfh. Sorry, forgot to mention something:  
a) results in the methods from my module being available in the  
ApplicationHelper directly after my definition but not when accessed  
from a  
view.  
b) results in a error message saying that I tried to call a private  
method.

---

<div class="post-metadata">

**Author:** ![Mariano\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eada6e/32.png) [@Mariano\_K](https://www.ruby-forum.com/u/Mariano_K)\
**Post date:** [March 26, 2006, 10:10am UTC](https://www.ruby-forum.com/t/rails-plugins-why-to-register-your-own-functionality-with-s/55941/3 "2006-03-26T10:10:09Z")

</div>

Mariano K. wrote:

> Hi there,
> 
> I have seen in the file column plugin (  
> [http://www.kanthak.net/opensource/file\_column/](http://www.kanthak.net/opensource/file_column/)) from Sebastian K.  
> or  
> David’s acts\_as\_taggable plugin that to register my functionality I need  
> to  
> do something like this:
> 
> ApplicationHelper.send(:include, InPlaceEditAssociations)
> 
> I am wondering why not:
> 
> (a)  
> module ApplicationHelper  
> include InPlaceEditAssociatons  
> end
> 
> or:
> 
> (b)  
> ApplicationHelper.include(InPlaceEditAssociations)
> 
> As I now know a way that works this is not crucial to me, but I am still  
> curious.
> 
> Cheers,  
> Mariano

With send you can call private methods so,  
ApplicationHelper.send(:include, InPlaceEditAssociations) is  
ApplicationHelper.include(InPlaceEditAssociations) except it doesn’t  
matter that the method is private.

joey\_\_

---

<div class="post-metadata">

**Author:** ![Mariano\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eada6e/32.png) [@Mariano\_K](https://www.ruby-forum.com/u/Mariano_K)\
**Post date:** [March 30, 2006, 7:01am UTC](https://www.ruby-forum.com/t/rails-plugins-why-to-register-your-own-functionality-with-s/55941/4 "2006-03-30T07:01:17Z")

</div>

Hey Joey,

thanks.

I am wondering what is the point of making a method private then? To  
give  
an indication that this method is not supposed to be called from the  
outside?

Cheers,  
Mariano
