Controller layer for Lotus.
It offers lightweight controllers and routing as Rack wrappers.
Add this line to your application's Gemfile:
gem 'lotus-controller'
And then execute:
$ bundle
Or install it yourself as:
$ gem install lotus-controller
# config.ru
require 'lotus-controller'
class FlowersController < Lotus::Controller
def index
response.body = ['Hello, Lotus!']
end
end
Routes = Lotus::Routes.draw do
get '/flowers', controller: 'flowers'
end
run Lotus::App.new(Routes)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request