Class: ViewComponent::Storybook::StoriesController

Inherits:
Rails::ApplicationController
  • Object
show all
Defined in:
app/controllers/view_component/storybook/stories_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



16
17
18
19
20
21
22
23
24
# File 'app/controllers/view_component/storybook/stories_controller.rb', line 16

def show
  params_hash = params.permit!.to_h

  @story = @story_config.story(params_hash)

  layout = @story_config.layout

  render layout: layout unless layout.nil?
end