aboutsummaryrefslogblamecommitdiffstats
path: root/railties/generators/model/USAGE
blob: 50ab3a8f09d37fec04259060f051b04c75f544ba (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                    

        
                             

           


                                                                            

       
                                    

                                                                     

                                                                    
GENERATOR
     model - create model stub files

SYNOPSIS
     generate model ModelName

DESCRIPTION
     The model generator takes a model name and generates an empty model in
     app/models, a test suite in test/unit with one passing test case, and a
     fixtures YAML file in the test/fixtures directory.

EXAMPLE
     ./script/generate model Account

     This will generate an Account class in app/models/account.rb, an
     AccountTest in test/unit/account_test.rb, and the fixtures file
     test/fixtures/account.yml.