I have a rails application that loads a lot of data from some java services. I am writing a module that will allow me to populate some of the selection windows with this data, and I am trying to enable them correctly so that I can refer to them in my views. Here is my module
module FilterOptions module Select def some_select return "some information" end end end
My idea was to include FilterOptions in my application_helper, and I thought I could reference my methods using Select::some_select This is not the case. I have to include FilterOptions::Select , then I can reference the some_select method myself. I don't want this, although I think this is a bit confusing to someone who might not know that some_select comes from my own module.
So, how do I write module methods that look like public static methods, so I can turn on my main module and reference my methods using the submodule namespace, for example Select::some_select
ruby module ruby-on-rails
brad
source share