lib/lotus/generators/application/container/lib/app_name.rb.tt in lotusrb-0.2.0 vs lib/lotus/generators/application/container/lib/app_name.rb.tt in lotusrb-0.2.1
- old
+ new
@@ -1,7 +1,7 @@
require 'lotus/model'
-Dir["#{ __dir__ }/**/*.rb"].each { |file| require_relative file }
+Dir["#{ __dir__ }/<%= config[:app_name] %>/**/*.rb"].each { |file| require_relative file }
Lotus::Model.configure do
# Database adapter
#
# Available options:
@@ -12,13 +12,19 @@
# * SQL adapter
# adapter type: :sql, uri: 'sqlite://db/<%= config[:app_name] %>_development.db'
# adapter type: :sql, uri: 'postgres://localhost/<%= config[:app_name] %>_development'
# adapter type: :sql, uri: 'mysql://localhost/<%= config[:app_name] %>_development'
#
- adapter type: :file_system, uri: ENV['<%= config[:app_name].upcase %>_DATABASE_URL']
+ adapter type: :file_system, uri: ENV['<%= config[:app_name].to_env_s %>_DATABASE_URL']
##
# Database mapping
+ #
+ # You can specify mapping file to load with:
+ #
+ # mapping "#{__dir__}/config/mapping"
+ #
+ # Alternatively, you can use a block syntax like the following:
#
mapping do
# collection :users do
# entity User
# repository UserRepository