Class: CafeCar::ExamplesController

Inherits:
Object
  • Object
show all
Includes:
Controller
Defined in:
app/controllers/cafe_car/examples_controller.rb

Constant Summary

Constants included from Controller

Controller::INDEX_VIEWS

Constants included from Controller::Filtering

Controller::Filtering::CONTROL_PARAMS

Instance Method Summary collapse

Methods included from Controller

#batch, #collection_action, #create, #destroy, #edit, #member_action, #new, #options, #respond_with, #show, #update

Instance Method Details

#indexObject



11
12
13
14
15
# File 'app/controllers/cafe_car/examples_controller.rb', line 11

def index
  @examples = view_context.template_glob("cafe_car/examples/ui/*")
    .map { _1.name.sub(/\..+$/, "") }
    .to_h { [ _1.camelize, "cafe_car/examples/ui/#{_1}" ] }
end