Sha256: 3425dbc8763276f268d89f27cd72d5e91df2c008b498278cb323a876c0b3072f
Contents?: true
Size: 776 Bytes
Versions: 2
Compression:
Stored size: 776 Bytes
Contents
module Padrino module Generators module Components module Orms module DatamapperGen DM = (<<-DM).gsub(/^ {10}/, '') module DataMapperInitializer def self.registered(app) app.configure(:development) { DataMapper.setup(:default, 'your_dev_db_here') } app.configure(:production) { DataMapper.setup(:default, 'your_production_db_here') } app.configure(:test) { DataMapper.setup(:default, 'your_test_db_here') } end end DM def setup_orm require_dependencies 'dm-core', 'dm-validations' create_file("config/initializers/data_mapper.rb", DM) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
padrino-gen-0.1.1 | lib/generators/components/orms/datamapper_gen.rb |
padrino-gen-0.1.0 | lib/generators/components/orms/datamapper_gen.rb |