Skip to content

Instantly share code, notes, and snippets.

Created December 14, 2011 02:27
What would you like to do?
Loading a class inside a module within Rails 3.0
# within app/importer/api.rb
module Importer
class API
# class body here
# this way works for some reason
# inside app/importer/api.rb
class Importer::API
# class body here
Loading development environment (Rails 3.0.10)
ruby-1.9.2-p290 :001 >
LoadError: Expected /Users/jake/Code/experimental/myproject/app/importer/api.rb to define API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment