github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

fightinjoe / merb-autoscaffold

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 11
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (4)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (4)
    • 0.2.0
    • 0.1.2
    • 0.1.1
    • 0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A gem to provide free scaffolding for all models — Read more

  cancel

http://fightinjoe.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixed requirement for both ActiveRecord and DataMapper to be present to 
use DataMapper as the ORM 
Aaron Wheeler (author)
Thu Jun 26 05:11:55 -0700 2008
commit  f1d82cedbfac327875dbc59d8b9c45740d30d525
tree    f63fa1bba795d15d0f80dc64ac2402b64c99e768
parent  e404861f3ef619b5d810678e0ef12e74cf2f221c
merb-autoscaffold /
name age
history
message
file .gitignore Loading commit data...
file CHANGELOG
file LICENSE
file README
file Rakefile
file TODO
directory lib/
directory spec/
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.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server