-
-
Save twe4ked/89c1e2c4c763a56725e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lotus-router' | |
require 'lotus-controller' | |
class EpisodesController | |
class Show | |
include Lotus::Action | |
def call(params) | |
p 'episodes#show' | |
end | |
end | |
class DownloadInfo | |
include Lotus::Action | |
def call(params) | |
p 'episodes#download_info' | |
end | |
end | |
end | |
router = Lotus::Router.new | |
router.resources 'episodes', only: [:show] do | |
collection do | |
get 'download_info' | |
end | |
end | |
app = Rack::MockRequest.new(router) | |
app.get 'episodes/1' | |
app.get 'episodes/download_info' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lotus-router' | |
require 'lotus-controller' | |
class EpisodesController | |
class Show | |
include Lotus::Action | |
def call(params) | |
p 'episodes#show' | |
end | |
end | |
class DownloadInfo | |
include Lotus::Action | |
def call(params) | |
p 'episodes#download_info' | |
end | |
end | |
end | |
router = Lotus::Router.new | |
router.resources 'episodes', only: [:show] do | |
collection do | |
get 'download_info' | |
end | |
end | |
app = Rack::MockRequest.new(router) | |
app.get 'episodes/1' | |
app.get 'episodes/download_info' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment