Sha256: b15aac2ea25276902d6489ea4c20631fb73c091d81d8d972b755ead4f1e1c53f

Contents?: true

Size: 646 Bytes

Versions: 1

Compression:

Stored size: 646 Bytes

Contents

class SlimController < ApplicationController
  def normal
  end

  def xml
  end

  def no_layout
    render layout: false
  end

  def variables
    @hello = "Hello Slim with variables!"
  end

  def partial
  end

  def streaming
    @hello = "Hello Streaming!"
    render :content_for, stream: true
  end

  def integers
    @integer = 1337
  end

  def thread_options
    default_shortcut = {'#' => {attr: 'id'}, '.' => {attr: 'class'} }
    Slim::Engine.with_options(shortcut: default_shortcut.merge({'@' => { attr: params[:attr] }})) do
      render
    end
  end

  def content_for
    @hello = "Hello Slim!"
  end

  def helper
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slim-5.1.1 test/rails/app/controllers/slim_controller.rb