Sha256: b1cfca49c016a3586c2238e878e8e078602763d00efbb96de88ba86772a95e84
Contents?: true
Size: 806 Bytes
Versions: 2
Compression:
Stored size: 806 Bytes
Contents
Description: Stubs out a new content block. Pass the content block name, either CamelCased or under_scored, and an optional list of attribute pairs as arguments. 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'. This generates a model class in app/models and a migration in db/migrate. Examples: `./script/generate content_block article` creates an Article model and migration: Migration: db/migrate/XXX_create_article.rb `./script/generate content_block article title:string body:text published:boolean` creates an Article model with a string title, text body, and published flag.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nate-browsercms-3.0.210 | rails_generators/content_block/USAGE |
nate-browsercms-3.0.211 | rails_generators/content_block/USAGE |