I''m writing an acts_as_x type plugin/gem and I need to know how to detect which other acts_as plugins are installed so I can avoid name conflicts. What''s a simple way to do this? Thanks John Small -- 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 -~----------~----~----~----~------~----~------~--~---
On Feb 26, 7:34 am, John Small <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''m writing an acts_as_x type plugin/gem and I need to know how to > detect which other acts_as plugins are installed so I can avoid name > conflicts. What''s a simple way to do this?Well there''s not much in the way of conventions or ways to list other installed plugins. You may find the easiest way is to namespace your stuff (so install of having MyAwesomeModule make it YourOrganisation::MyAwesomeModule), but as far as you and some other plugin both adding an acts_as_foo method you''re probably out of luck. You can find out if the method you are about to add is already there, but depending on plugin load order you might load before the conflicting plugin. Fred> > Thanks > > John Small > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On Feb 26, 7:34�am, John Small <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> I''m writing an acts_as_x type plugin/gem and I need to know how to >> detect which other acts_as plugins are installed so I can avoid name >> conflicts. What''s a simple way to do this? > > Well there''s not much in the way of conventions or ways to list other > installed plugins. You may find the easiest way is to namespace your > stuff (so install of having MyAwesomeModule make it > YourOrganisation::MyAwesomeModule), but as far as you and some other > plugin both adding an acts_as_foo method you''re probably out of luck. > You can find out if the method you are about to add is already there, > but depending on plugin load order you might load before the > conflicting plugin. > > FredI rather thought that might be the case, I''ll name space myself and add a switch to the initialization to determine whether to use probably unique but awkward method names or simpler but probably conflicting method names. -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---