Skip to content

Commit

Permalink
Include models in the Rails load path
Browse files Browse the repository at this point in the history
  • Loading branch information
latortuga committed Aug 26, 2011
1 parent 61b6051 commit e06d8ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/has_magic_columns.rb
Expand Up @@ -21,3 +21,11 @@
# @model.first_name #=> "Brandon"
module HasMagicColumns # :nodoc:
end

%w{ models }.each do |dir|
path = File.join(File.dirname(__FILE__), 'app', dir)
$LOAD_PATH << path
ActiveSupport::Dependencies.load_paths << path
ActiveSupport::Dependencies.load_once_paths.delete(path)
end

0 comments on commit e06d8ba

Please sign in to comment.