48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/generators/jinda_engine/config_generator.rb', line 48
def setup_mongoid
generate "mongoid:config"
inject_into_file 'config/mongoid.yml', :after => ' # raise_not_found_error: true' do
"\n raise_not_found_error: false"
end
inject_into_file 'config/mongoid.yml', :after => ' # belongs_to_required_by_default: true' do
"\n belongs_to_required_by_default: false"
end
inject_into_file 'config/mongoid.yml', :after => ' # app_name: MyApplicationName' do
"\n\nproduction:" +
"\n clients:" +
"\n default:" +
"\n uri: <%= ENV['MONGODB_URI'] %>" +
"\n options:" +
"\n raise_not_found_error: false" +
"\n belongs_to_required_by_default: false\n"
end
end
|