class Humpyard::Generators::ElementGenerator
Element Generator¶ ↑
rails humpyard:element ElementName [field:type field:type] [options]
Description¶ ↑
The humpyard element generator creates a custom element that can be used inside your humpyard pages.
Options¶ ↑
[--skip-model]-
Don't generate a model or migration file.
[--skip-migration]-
Dont generate migration file for model.
[--skip-timestamps]-
Don't add timestamps to migration file.
[--skip-views]-
Don't generate view files.
Runtime options¶ ↑
-q, [--quiet]-
Supress status output
-p, [--pretend]-
Run but do not make any changes
-s, [--skip]-
Skip files that already exist
-f, [--force]-
Overwrite files that already exist
Test framework options¶ ↑
[--testunit]-
Use test/unit for test files.
[--shoulda]-
Use shoulda for test files.
[--rspec]-
Use RSpec for test files.
[--skip-tests]-
Don't generate test files.
Examples¶ ↑
rails generate humpyard:element SimpleText text:string rails generate humpyard:element another_thing content:text --skip-tests