Skip to content

How to destroy a binding

macourtney edited this page Sep 13, 2010 · 2 revisions

Added for version: 0.6
Updated for version: 0.7

Bindings are used to bind data from one or more models to a view.

To destroy a specific binding, call the destroy.clj script passing the binding command and the controller and action for the binding.

For example, to destroy the binding named “hello-world” in controller “hello”, use the following:

lein conjure destroy binding hello hello-world

You should see the following output:

.\lib\*;.\vendor;.\app;.\config;.\script;.\db;.\test
Initializing environment...
INFO  [conjure.server.server]: Initializing server...
DEBUG [flavors.h2]: Executing query: ["SELECT * FROM sessions LIMIT 1"]
INFO  [conjure.server.server]: Server Initialized.
INFO  [conjure.server.server]: Initializing plugins...
INFO  [conjure.server.server]: Plugins initialized.
INFO  [destroyers.binding-destroyer]: File hello_world.clj destroyed.

Note: destroy will only delete the binding file. If you used the generate script to create your binding and wish to destroy all files created with the generate command, you’ll need to run the destroy script for each file created by the generator. See How to generate a binding for what files are created by the generator.

Clone this wiki locally