Sha256: 1e40d06607befaf02ea977ae6407b5b9829de962521082fbd1159063f68b2ff3
Contents?: true
Size: 784 Bytes
Versions: 7
Compression:
Stored size: 784 Bytes
Contents
h1. Version 2 h2. Orm The macros should allow setting a default :orm, but always allow to specify the orm to use for a particular context. h2. Template language The macros should allow setting a default :template language (Tlang), but always allow to specify the Tlang to use for a particular context. h2. Contexts <pre> with :orm => :mongoid, :template_lang => :erb do |app| app.create_model 'User::Guest' do |model| model.add_field :name, :type => :string, :required => true model.add_method :get_stuff, :params => [:a, :b] do '@a = a' end model.add_code do %q{ def hello options = {} puts "hi" end } end end app.create_model 'User::Guest' do |model| model.add_field :name, :type => :string, :required => true end end </pre>
Version data entries
7 entries across 7 versions & 1 rubygems