garybernhardt/raptor — Issue #16: Put routes in a class method
Author: jnicklas
Created: 2011-11-09 13:42:30+00:00
State: open

It would be cool if we didn't have to load Raptor in order to require a particular resource.

Currently we have this:

``` ruby
module Posts
Routes = Raptor.routes(self) do
...
end
```

if we change this to:

``` ruby
module Posts
def self.routes
Raptor.routes(self) do
...
end
end
```

it's a little more verbose, but we don't have to have Raptor defined in order to load this resource.

What do you think?