Clean up your Rails Controllers
with Decent Exposure


Name: Ryan Jones
Position: AMA - Manager, Web Development
Email: ryan@system88.com

Overview

Rails Controllers + Instance Variables



app/controllers/posts_controller.rb


app/views/posts/show.html.erb

Rails Controllers + Instance Variables - Problems

app/controllers/posts_controller.rb


app/views/posts/show.html.erb

Decent Exposure Overview - Rails Scaffold

Rails default scaffold


Decent Exposure Overview - decent_exposure


Decent Exposure - Magic explained

Decent Exposure - Magic explained cont.

Decent Exposure - Magic explained cont.

Decent Exposure - Magic explained cont.

Configuration

Specify the model name:

Specify the parameter accessor method:

Specify the finder method (ie: reset password):

Specify the parameter key to use to fetch the object:

Off the beaten path (careful):

Customization (Strategies)

Questions? Comments?

Refs

#

/