No release in over 3 years
Low commit activity in last 3 years
Rack Middleware that injects an iframe around the response content to allow for responsive previewing
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 4.2
 Project Readme

ResponsivePreview

Rack Middleware gem that injects an iframe around the response for the purpose of testing responsive css at different breakpoints.

Usage

Define when the responsive preview is shown

class MyController < ApplicationController
  def wants_responsive_preview?
    # some condition to decide when to view the page in the responsive preview layout
  end
end

Provide a responsive preview layout

<!-- app/views/layouts/responsive_preview.html.erb -->

<!-- Add some other chrome for switching devices/iframe dimensions -->
<%= content_tag :iframe, '', srcdoc: yield %>
<%= responsive_preview_js %>