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