Skip to content

a better plugin to use the flash relation browser by moritz stefaner in any rails application

License

Notifications You must be signed in to change notification settings

branch14/moritz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moritz Plugin
=============

Moritz is a Plugin for Ruby On Rails that helps bringing Moritz
Stefaner's Relation Browser easily to any Rails App.

Install it like this

  $ script/plugin install git://github.com/branch14/moritz.git

Please find Moritz's work here:

  http://moritz.stefaner.eu/projects/relation-browser/


Example
=======

Automatic Install
-----------------

   $ rake moritz:install model=mproxy controller=moritz


Manual Install
--------------

1. Generate a proxy model, e.g.

   $ script/generate moritz mproxy

   Rename the generated model

   $ mv app/models/mproxy.rb_ app/models/mproxy.rb

2. Generate a proxy controller, e.g.
   (just in case you don't want to use an existing controller)

   $ CONTROLLER=moritz
   $ script/generate controller $CONTROLLER

3. Add relation brwoser functionality to the controller, e.g.

   relation_browser :mproxy

4. Copy the views

   $ cp vendor/plugins/moritz/resources/views/*.rxml app/views/$CONTROLLER

5. Copy the RelationsBrowser of your choice, e.g.

   $ cp vendor/plugins/moritz/resources//RelationBrowser_v1.2/generic/RelationBrowser.swf public

6. Browse to ...

   /RelationBrowser.swf?dataSource=/<controller>/root/<model>_<id>


Customizations
--------------

1. data gathering and proxy magic is happening in the generated model, e.g.

   app/models/mproxy.rb

2. XML is rendered here

   app/views/$CONTROLLER/root.rxml
   app/views/$CONTROLLER/children.rxml


Have fun!

--
Copyright (c) 2008,2009 Ed Allen & Phil Hofmann, released under the MIT license

About

a better plugin to use the flash relation browser by moritz stefaner in any rails application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages