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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 ) on Rails ( http://www.railsfrance.org ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dont worry, came across this ActionView::Base.send :include, PersonaliseSite Scott Scott Sherwood 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-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---