Sha256: daeaea6537983aabf9d3557274023a72376ae71de2c82f3f8774d6bc0a15fafd
Contents?: true
Size: 685 Bytes
Versions: 2
Compression:
Stored size: 685 Bytes
Contents
module Ckeditor::BaseHelper def ckeditor_asset_path(kind) path = case kind when :image then Ckeditor.file_manager_image_upload_uri when :file then Ckeditor.file_manager_upload_uri else '/ckeditor/attachment_files' end session_key = Rails.application.config.send(:session_options)[:key] options = Rails.application.routes.recognize_path(path, :method => :post) options[:protocol] = "http://" options[session_key] = Rack::Utils.escape(cookies[session_key]) if protect_against_forgery? options[request_forgery_protection_token] = Rack::Utils.escape(form_authenticity_token) end url_for(options) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ckeditor-3.5.4 | app/helpers/ckeditor/base_helper.rb |
ckeditor-3.5.3 | app/helpers/ckeditor/base_helper.rb |