class Humpyard::Generators::ElementGenerator

Element Generator

rails humpyard:element ElementName [field:type field:type] [options]


The humpyard element generator creates a custom element that can be used inside your humpyard pages.



Don't generate a model or migration file.


Dont generate migration file for model.


Don't add timestamps to migration file.


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


Use test/unit for test files.


Use shoulda for test files.


Use RSpec for test files.


Don't generate test files.


rails generate humpyard:element SimpleText text:string 
rails generate humpyard:element another_thing content:text --skip-tests