This is in my config/initializer/string.rb:
class String
include ClearCompany
end
I have lib/clear_company.rb
That is where I have a module ClearCompany.
This is in my config/initializer/string.rb:
class String
include ClearCompany
end
I have lib/clear_company.rb
That is where I have a module ClearCompany.
You need to require that file, as constants aren't autoloaded from lib
in Rails 3:
require 'clear_company'
You could also add lib
back to the load paths by putting this in your Application
's class:
config.autoload_paths += %W(#{Rails.root}/lib)