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