22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/bridgetown-plugin-nano/command_helpers/database_helpers.rb', line 22
def finish_database_setup
self.destination_root = File.expand_path(folder_name)
append_to_file(
"config/base_classes.rb",
"\n" + File.read("#{self.class.source_root}/base_classes/application_record.rb")
)
inject_into_file "config/application.rb",
"require \"active_record/railtie\"\n",
after: "require \"action_controller/railtie\"\n"
say_status :nano, "Database configuration complete!"
say_status :nano, "You will need a RAILS_ENV environment variable set,"
say_status :nano, "then run `bundle install`."
say_status :nano, "Afterwards, you can now run commands like" \
" `bridgetown nano exec db:setup` to create your database."
end
|