Class: Monolith::RoutesController
Defined Under Namespace
Classes: Index, Route, Show
Instance Method Summary
collapse
Instance Method Details
#index ⇒ Object
4
5
6
|
# File 'app/controllers/monolith/routes_controller.rb', line 4
def index
render Index.new.tap { _1.routes = Route.all }
end
|
#show ⇒ Object
8
9
10
11
12
13
|
# File 'app/controllers/monolith/routes_controller.rb', line 8
def show
route = Route.find(params[:id].to_s)
return render plain: "Route not found", status: :not_found unless route
render Show.new.tap { |v| v.route = route }
end
|