fightinjoe / merb-autoscaffold
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (4)
- Wiki (1)
- Graphs
-
Tree:
e404861
Aaron Wheeler (author)
Wed May 21 06:02:36 -0700 2008
commit e404861f3ef619b5d810678e0ef12e74cf2f221c
tree eb456b63d85a746f964d75850cfbf5c6ad5da72e
parent 996637d92c8a863aac9c0dd80e021bc273b12ce6
tree eb456b63d85a746f964d75850cfbf5c6ad5da72e
parent 996637d92c8a863aac9c0dd80e021bc273b12ce6
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Tue May 20 02:54:04 -0700 2008 | |
| |
CHANGELOG | Wed May 21 06:30:22 -0700 2008 | |
| |
LICENSE | Thu Apr 24 22:48:42 -0700 2008 | |
| |
README | Wed May 21 06:30:22 -0700 2008 | |
| |
Rakefile | Sat Apr 26 16:32:32 -0700 2008 | |
| |
TODO | Sat Apr 26 00:41:22 -0700 2008 | |
| |
lib/ | ||
| |
spec/ | Wed May 21 06:30:22 -0700 2008 |
README
merb_autoscaffold ================= Merb AutoScaffold is a Merb plugin that provides scaffolding for free for all models. Merb AutoScaffold currently works with DataMapper 0.3 and ActiveRecord. ==== Usage: You must first build and install the gem. From the merb_autoscaffold directory, run: $ sudo rake gem install Then add a dependency in your init.rb file: dependency 'merb_autoscaffold' Scaffolds will then be available for all models in your application. If a controller for a model already exists, then any actions in that controller will be preserved, while the missing CRUD actions will be added ==== Example: # /app/models/blog.rb class Blog < DataMapper::Base property :title, :string property :content, :text has_many :comments end # /config/init.rb ... dependency 'merb_autoscaffold' ... # Run the Merb server $ merb # Scaffolds are now available at http://localhost:4000/scaffolds from your web browser # You can customize the path to the scaffolds by editing the AutoScaffold's configs # in the /config/init.rb file in the +after_app_loads+ block: Merb::BootLoader.after_app_loads do # scaffolds will be available at /foo instead of /scaffolds Merb::Plugins.config[:merb_autoscaffold][:namespace] = 'foo' end ==== Caveats Currently, autoscaffolds only work with DataMapper 0.3 and ActiveRecord models. Autoscaffolds also will not work with flat Merb apps.

