Sha256: 6c2ac72744e0e21efa020661465a9fda4b6bbb1a87cf1920ae81b19579b0ea6d
Contents?: true
Size: 1.02 KB
Versions: 34
Compression:
Stored size: 1.02 KB
Contents
Description: Create a new content block, along with controller, tests and migrations. Examples: `rails generate cms:content article` Creates an Article model, controller, views, tests, and migration: Model: app/models/article.rb Unit Test: test/unit/models/article_test.rb Migration: db/migrate/XXX_create_article.rb Controller: app/controllers/cms/article_controller.rb Functional Test: test/functional/cms/article_controler_test.rb Form Partials: app/views/cms/articles/_form.html.erb app/views/cms/articles/render.html.erb This block will have a single attribute, name:string and a form with text_field to edit the name. `rails generate content Article name:string body:text published:boolean` Creates an Article model with a string name, text body, and published flag. It will create form fields for these attributes in _form.html.erb.
Version data entries
34 entries across 34 versions & 2 rubygems