Hello all,

I have a module that contains a class as following

my_module.rb
------------------
module MyModule

class MyClass < OtherClass

   def my_method(value)
    #process value
    return value
   end

end

end
--------------------------


In my controller

class MyController < ApplicationController
  include MyModule::MyClass  ### How to include module's class here

  def show
   @result = my_method(value)    ### How to access module's class method
here
  end

end
--------------------------
but it throws error
TypeError
wrong argument type Class (expected Module)


How can I use a module's class's method in my controller?

Thanks,

Vikas.
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to