# Help creating plugin?

**URL:** <https://www.ruby-forum.com/t/help-creating-plugin/90953>\
**Category:** Rails\
**Created:** [April 3, 2007, 10:41am UTC](https://www.ruby-forum.com/t/help-creating-plugin/90953 "2007-04-03T10:41:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asherwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@asherwood](https://www.ruby-forum.com/u/asherwood)\
**Post date:** [April 3, 2007, 10:41am UTC](https://www.ruby-forum.com/t/help-creating-plugin/90953/1 "2007-04-03T10:41:10Z")

</div>

Hi,

I am attempting to put a plugin together for the first time and am  
having a few problems gettign started.

I have generated the plugin dir’s and have a file called  
personalise\_site.rb  
Also I have placed require ‘personalise\_site’ init.rb

How can I get make all methods I put inside module PersonaliseSite  
available to all views?

Thanks,  
Scott

---

<div class="post-metadata">

**Author:** ![asherwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@asherwood](https://www.ruby-forum.com/u/asherwood)\
**Post date:** [April 3, 2007, 10:57am UTC](https://www.ruby-forum.com/t/help-creating-plugin/90953/2 "2007-04-03T10:57:09Z")

</div>

dont worry, came across this  
ActionView::Base.send :include, PersonaliseSite

Scott

Scott S. wrote:

> Hi,
> 
> I am attempting to put a plugin together for the first time and am  
> having a few problems gettign started.
> 
> I have generated the plugin dir’s and have a file called  
> personalise\_site.rb  
> Also I have placed require ‘personalise\_site’ init.rb
> 
> How can I get make all methods I put inside module PersonaliseSite  
> available to all views?
> 
> Thanks,  
> Scott

---

<div class="post-metadata">

**Author:** ![asherwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@asherwood](https://www.ruby-forum.com/u/asherwood)\
**Post date:** [April 3, 2007, 10:57am UTC](https://www.ruby-forum.com/t/help-creating-plugin/90953/3 "2007-04-03T10:57:58Z")

</div>

Hi Scott,

> I am attempting to put a plugin together for the first time and am  
> having a few problems gettign started.
> 
> I have generated the plugin dir’s and have a file called  
> personalise\_site.rb  
> Also I have placed require ‘personalise\_site’ init.rb
> 
> How can I get make all methods I put inside module PersonaliseSite  
> available to all views?

In your init.rb :

require ‘personalise\_site’  
ActionView::Base.send(:include, PersonaliseSite)

– Jean-François.

–  
Ruby ( [http://www.rubyfrance.org](http://www.rubyfrance.org) ) on Rails ( [http://www.railsfrance.org](http://www.railsfrance.org)  
)
