Posted By: Todd
Date: 2007-04-06 10:11
Summary: FlexScaffold 0.1.0
Project: Flexible Rails= flex_scaffold RESTfully

=FlexScaffold


Flex Scaffold should allow you to swap in and out different view layers on your REST controller.
For example, to use the model <tt>contact</tt>, use <tt>flex_scaffold: contact</tt>

class ContactsController < ApplicationController

layout 'flex_scaffold'
flex_scaffold :contact (optional - :size => '800x600')

# The following line can be used instead of the generated definitions
# of index, show, new, edit, update, destroy. There is also the action
# schema to look at the data model
...
end

Other files that are created:

/app/flex/contacts/_list.mxml
/app/flex/contacts/_contacts.mxml <-- these are compiled to a swf file

/public/swfs/flex_scaffold/_contacts.swf <-- created via rake flex:app mxml=contacts

/app/views/layout/flex_scaffold.rhtml <-- templated pages
/app/views/flex_scaffold/index.rhtml <-- loads up the swf

==USAGE

===Summary

To generate a scaffold for the model <tt>message</tt> with fields <tt>title</tt> and <tt>body</tt>:

> ruby script/generate flex_scaffold_resource message title:string body:string
> rake db:migrate
> ruby script/generate flex_scaffold message
> rake flex:app mxml=messages
> ruby script/server start

===Phase I (complete)
* tie in REST (resource) generation for flex_scaffold
* scaffold model for flex viewing (flex_scaffold)
* generate mxml files for model
* compile swf
* transfer swf to public folder
* load page which points flash file (use JavascriptHelper in openLaszlo)
* add CRUD actions on controller
* add return schema onto controller

Latest News
icalendar 1.4.0 Released
    Ryan Ahearn - 2013-05-21 23:17
BinData 1.5.0 - source moved to github
    Dion Mendel - 2013-05-21 11:10
v13.5.0 Released !!
    id 774 - 2013-05-18 12:28
Runt v0.9.0 Released
    Matthew Lipper - 2013-05-17 00:11
kramdown 1.0.2 released
    Thomas Leitner - 2013-05-09 06:58

 

Forums | Admin

Discussion Forums: 0.1.0-released

Start New Thread Start New Thread

 

Topic Topic Starter Replies Last Post