0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Takes care of the basic seven CRUD controller methods against HTML, XML, JSON and YAML. This was very useful with Rails 2.x. Under Rails 3 and later, this isn't quite as necessary, since rendering became a lot easier.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project 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.