Class: Podium::PodletPreviewController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Podium::PodletPreviewController
- Defined in:
- app/controllers/podium/podlet_preview_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/podium/podlet_preview_controller.rb', line 3 def index @podlets = Podium::PodletPreview.podlets links = @podlets.map do |podlet| name = podlet.to_s.underscore %(<li><a href="#{podlet_preview_path}/#{name.dasherize}"> #{name.humanize}</a></li>) end.join("\n") render html: <<-HTML.html_safe <h1>Podlet Preview</h1> <ul> #{links} </ul> HTML end |