A little bit above ActionController::Base
Ruby
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc/FirstFloor_ideas.oo3
lib/action_controller
test
.gitignore
LICENSE
README
Rakefile
VERSION.yml
first-floor.gemspec

README

first-floor
===========

An extension for ActionController::Base. I'm lazy and am tired of:

- Updating controller code to do what I want for every project
- Copying the same controller centralization code between projects. It's not
  DRY. Eventually, things that aren't DRY begin to smell.

So, what am I doing here?

This gem defines ActionController::FirstFloor, which inherits 
ActionController::Base

It defines the following common REST methods:
* index
* show
* new
* create
* edit
* update
* destroy

It also defines render_response, which takes an object, a template name and 
an optional status. The seven methods utilize render_response to
render a response. HTML, JSON, XML and YAML are supported. The extension of 
the request will determine the response format. Template names are presumed
to be the method named itself. Objects used within the templates are 
assumed to be the object name. For instance, you have object Foo.

* An index will return @foos
* show will use @foo

In my workflow, I generate model and controller with rspec's generator, and
then can rip out the guts of the generated controllers in favor of FirstFloor.

Next steps: 
- improving my project generation process.
- Adding a test suite

COPYRIGHT
=========

Copyright (c) 2009-2012 Nathan L. Walls. See LICENSE for details.