Sha256: b3837d5a96290b6c98a4e2ee5be380bd96e10fc838445f35c9a2f5b3b7988264
Contents?: true
Size: 1.32 KB
Versions: 6
Compression:
Stored size: 1.32 KB
Contents
Description: Scaffolds an entire Ruboss resources. The resource is ready to use as a starting point for your restful, resource-oriented application. ruboss_scaffold : 1. Generates all required Flex code. 2. You can pass special belongs_to, has_one and has_many attributes to generate appropriate relationships. Pass the name of the model, either CamelCased or under_scored, as the first argument, and an optional list of attribute pairs. Attribute pairs are column_name:sql_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'. The syntax for belongs_to, has_one and has_many attributes is as follows: belongs_to:<relationship_name> or belongs_to:<relationship_name>,<another_relationship>,<and_another> 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 resource immediately. For example, `ruboss_scaffold post title:string body:text published:boolean` gives you a model with those three attributes. Examples: `./script/generate ruboss_scaffold project name:string has_many:tasks` `./script/generate ruboss_scaffold task name:string belongs_to:project`
Version data entries
6 entries across 6 versions & 2 rubygems