[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

New Rails plugin 'Liftoff' is available.

Ben Tompkins

10/15/2007 8:33:00 PM

http://liftoff.rub...

Summary

Liftoff is a simple Rails plugin that gets your application
off the ground by generating an initial set of model files from
a single text file in which you specify only the names of the models
and the types of the associations that pertain to them using an
extremely simple DSL called "CAL". CAL stands for
"Compact Association Language" and looks like this (of course,
comments are optional).


#############################################################################
# CAL File for web store.
#
#############################################################################

# A customer places one or more orders.
# An order may request more than one product, which may be requested by
# multiple orders.
# A line item references a single product.

customer < order <> product <= line_item # A line_item must specify
# a
quantity for the product.



# For every order, exactly one invoice shall be generated.
# An invoice may contain multiple line items.

order => invoice < line_item


# A category describes many products and a product may be described by
# multiple categories.

category <> product

#############################################################################