Skip to content
Snippets Groups Projects
Commit 726162ea authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

just changing the classes names for compatibility

parent 6ce3778c
No related branches found
No related tags found
No related merge requests found
...@@ -23,10 +23,13 @@ module Portalmec ...@@ -23,10 +23,13 @@ module Portalmec
# Do not swallow errors in after_commit/after_rollback callbacks. # Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true config.active_record.raise_in_transactional_callbacks = true
# loading lib files
config.autoload_paths << Rails.root.join('lib')
config.autoload_paths << Rails.root.join('app/repositories')
# Retrive the repository for current environment # Retrive the repository for current environment
def self.repository def self.repository
RepositoryEnvironments.fetch Rails.env Repository::Environments.fetch Rails.env
end end
end end
......
RepositoryEnvironments.create :development do |repository| Repository::Environments.create :development do |repository|
repository.register :user, Repositories::InMemory::UserRepository.new repository.register :user, InMemory::UserRepository.new
end end
RepositoryEnvironments.create :test do |repository| Repository::Environments.create :test do |repository|
repository.register :user, Repositories::InMemory::UserRepository.new repository.register :user, InMemory::UserRepository.new
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment