30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/realm/config.rb', line 30
def persistence_gateway
return {} unless @persistence_gateway
class_path = engine_path && "#{engine_path}/app/persistence/#{namespace}"
repos_path = class_path && "#{class_path}/repositories"
repos_module = "#{root_module}::Repositories"
{
root_module: root_module,
class_path: class_path,
repos_path: repos_path,
repos_module: repos_module,
migration_path: engine_path && "#{engine_path}/db/migrate",
repositories: repositories(repos_path, repos_module),
}.merge(@persistence_gateway)
end
|