Class: ComponentsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/components_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



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

#showObject



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