Generator

floere edited this page Sep 13, 2010 · 4 revisions

Generates view model class, spec, and views. Use as follows:

Simple

script/generate view_models <view model class name>

Example:

script/generate view_models User

With partials for render_as

script/generate view_models <view model class name> <partials for render_as, space separated>

Example:

script/generate view_models User compact extensive list_item table_item