A proof of concept of having Sinatra like routes inside your controllers.
Since the router is gone, feel free to remove config/routes.rb
.
Then add the file below to lib/action_controller/inline_routes.rb
inside your app.
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
class Function | |
attr_reader :name, :fn | |
class Composed | |
attr_reader :left, :right | |
def initialize(left, right) | |
@left = left | |
@right = right | |
end |
In your command-line run the following commands:
brew doctor
brew update