Sha256: abf3ca0e2bad20af00e2d72cbf3d0b570abb76974c285a6f395204e90121ca3f
Contents?: true
Size: 433 Bytes
Versions: 2
Compression:
Stored size: 433 Bytes
Contents
module Locomotive class InlineEditorMiddleware 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 '</body>', %( <a href="_admin">Admin</a> </body> ) [response[0], response[1], [html]] else response end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotive_cms-2.0.0.rc2 | app/middlewares/locomotive/inline_editor_middleware.rb |
locomotive_cms-2.0.0.rc1 | app/middlewares/locomotive/inline_editor_middleware.rb |