Rake tasks for creating new blueprint modules [07.08.2008]

Until recently, you used the script/generate task to create new blueprint modules. Now that blueprints are stored in a separate repository, however, this approach has been deprecated in favour of a rake task that not only generates the requisite files and directories, but imports them into your blueprint repository, and checks them out for you.

You can learn about the rake tasks using the -D describe switch:

$ rake -D blueprint:create
rake blueprint:create
    Generate a new blueprint, checking it into a blueprint repository. 
        Arguments:
          CODE    - the blueprint code for the new blueprint
          ACTIONS - string list of actions (white-space separated) for which to
                    create templates and controller actions.

rake blueprint:create:inherit
    Generate a new blueprint inheriting from an existing blueprint, checking 
          it into the selected repository. Arguments:
            CODE    - the blueprint code for the child blueprint
            PARENT  - the blueprint code for the parent blueprint

So, for example, to create a 'Directory' blueprint:

rake blueprint:create CODE=dir ACTIONS="index list item alphabetical by_publication_date"

Or to extend the existing 'Gallery' blueprint to handle videos:

rake blueprint:create:inherit PARENT=gly CODE=vidgly
Only the comment field is required. Omitting the ID fields increases your risk of being mistaken for spam.

Preview or