module Locomotive module Middlewares class InlineEditor def initialize(app, opts = {}) @app = app end def call(env) response = @app.call(env) unless response[1]['Editable'].blank? html = response.last.body.to_s.gsub '', %( Admin ) [response[0], response[1], [html]] else response end end end end end