Skip to content

Instantly share code, notes, and snippets.

@furaji
Last active August 29, 2015 14:19
Show Gist options
  • Save furaji/166c01a6bc39ecfbcd87 to your computer and use it in GitHub Desktop.
Save furaji/166c01a6bc39ecfbcd87 to your computer and use it in GitHub Desktop.
Ruby - LotusのControllerをRailsっぽく1ファイルにまとめたい ref: http://qiita.com/furajium/items/a8ec47926cefab9b2f90
# apps/web/config/routes.rb
get '/', to: 'home#index'
get '/show', to: 'home#show'
module Web::Controllers::Home
class Index
include Web::Action
def call(params)
end
end
end
module Web::Controllers::Home
class Show
include Web::Action
def call(params)
end
end
end
module Web::Views::Home
class Index
include Web::View
end
end
module Web::Views::Home
class Show
include Web::View
end
end
module Web::Controllers::Home
class Index
include Web::Action
def call(params)
end
end
class Show
include Web::Action
def call(params)
end
end
end
module Web::Views::Home
class Index
include Web::View
end
class Show
include Web::View
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment