Class: ComponentsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ComponentsController
- Defined in:
- app/controllers/components_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 6 |
# File 'app/controllers/components_controller.rb', line 2 def index @components = G5ComponentGarden.all.map do |component| ComponentDecorator.new(component, view_context) end end |
#show ⇒ Object
8 9 10 11 |
# File 'app/controllers/components_controller.rb', line 8 def show component = G5ComponentGarden.find(params[:slug]) @component = ComponentDecorator.new(component, view_context) end |