Sha256: c0572624ed2cdce9a299d36fa65c34bf6c82befe61d33d5828f33c8b97d48043

Contents?: true

Size: 308 Bytes

Versions: 39

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module Thredded
  module RenderPreview
    protected

    def render_preview
      if request.xhr?
        render layout: false
      else
        @preview_content = render_to_string(layout: false)
        render template: 'thredded/shared/preview'
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
thredded-0.16.16 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.15 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.14 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.13 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.12 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.11 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.10 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.9 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.8 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.7 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.6 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.5 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.4 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.3 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.1 app/controllers/concerns/thredded/render_preview.rb
thredded-0.16.0 app/controllers/concerns/thredded/render_preview.rb
thredded-0.15.5 app/controllers/concerns/thredded/render_preview.rb
thredded-0.15.4 app/controllers/concerns/thredded/render_preview.rb
thredded-0.15.3 app/controllers/concerns/thredded/render_preview.rb
thredded-0.15.2 app/controllers/concerns/thredded/render_preview.rb