Sha256: 109f258dd0ee7ad3614a75e75d112ba4a43c2dd935a7f9e17fcb3eaeb787f598
Contents?: true
Size: 587 Bytes
Versions: 43
Compression:
Stored size: 587 Bytes
Contents
module Releaf::ActionController::RichtextAttachments extend ActiveSupport::Concern included do skip_before_action :verify_authenticity_token, only: [:create_releaf_richtext_attachment] end def releaf_richtext_attachment_upload_url begin url_for(action: :create_releaf_richtext_attachment) rescue ::ActionController::UrlGenerationError nil end end def create_releaf_richtext_attachment return unless params[:upload] @resource = Releaf::RichtextAttachment.create!(file_type: params[:upload].content_type, file: params[:upload]) end end
Version data entries
43 entries across 43 versions & 1 rubygems