module RailsConnector module EditingHelper def include_editing_stylesheet if inline_editing_allowed? stylesheet_link_tag :infopark_editing end end def include_editing_javascript if inline_editing_allowed? raw <<-EOF #{javascript_include_tag(:infopark_editing)} #{javascript_tag('$(function() { infopark.editing.initialize(); });')} EOF end end def inline_editing_allowed? Configuration.editing_auth_callback.call(request.env) end end end