Sha256: d6284955cafdd3f6b86b6a23d475f636a1d023f3d97f8a01e0651d259a4ea22d
Contents?: true
Size: 1.05 KB
Versions: 9
Compression:
Stored size: 1.05 KB
Contents
Description: Stubs out a new job model. Pass the model name, either CamelCased or under_scored, and an optional list of attribute pairs as arguments. Attribute pairs are field:type arguments specifying the model's attributes. Timestamps are added by default, so you don't have to specify them by hand as 'created_at:datetime updated_at:datetime'. You don't have to think up every attribute up front, but it helps to sketch out a few so you can start working with the model immediately. This generator invokes your configured ORM and test framework, which defaults to ActiveRecord and TestUnit. Available field types: For more information see: `rails generate model --help` Example: `rails generate osc_machete_rails:job_model ThingJob thing:references` For ActiveRecord and TestUnit it creates: Model: app/models/thing_job.rb Test: test/models/thing_job_test.rb Fixtures: test/fixtures/thing_jobs.yml Migration: db/migrate/XXX_create_thing_jobs.rb
Version data entries
9 entries across 9 versions & 1 rubygems