This repository is in support of a talk given at Tampa Ruby
I’ve been experimenting with ideas from Corey Haines’ presentation to Tampa.rb and in this presentation I’ll give a peek at what I’ve been trying with our code base.
I’ll also discuss some ideas I have for addressing some of the issues I’ve been debating and have also been floating around the Rails community. Perhaps you don’t share these same issues or have a different/better way to solve them. I’ll walk through my ideas (just pseudocode at the moment unless I have time before the meetup to package the ideas into code) and debate their merits.
Things I want to be able to decouple/achieve with my Rails code:
-
More flexible parameter protection than attr_accessible. Ability to base this on user-permissions, if the request is an API request, etc.
-
Validation also based on context (user vs API, permission based, etc.)
-
Test business/model logic without having to load Rails/ActiveRecord/Database
-
Decouple before and after filters to allow them to be based on context as well