Skip to content

Commit

Permalink
systax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dux committed Mar 1, 2014
1 parent 9ce7886 commit 0254efc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
### About


Simple helper that reads attributes assigned to ruby methods, similar like python function decorators.
Simple helper that reads attributes assigned to ruby methods, similar to python function decorators.

If you have file root_controller.rb
If you have file called root_controller.rb

class RootController < ApplicationController

Expand All @@ -16,7 +16,7 @@ If you have file root_controller.rb
end
end

And somewhere in code you execute
if you execute

p RootController.aspects

Expand All @@ -30,7 +30,15 @@ This can be useful if you for example want to have defined routes inside a rails

in routes.rb you can define something like this

App::Application.routes.draw do
#= get
def index
...

#= post
def action
...

App::Application.routes.draw do

aspect_routes UsersController

Expand Down

0 comments on commit 0254efc

Please sign in to comment.