Module: Releaf::ActionController::RichtextAttachments
- Extended by:
- ActiveSupport::Concern
- Included in:
- Releaf::ActionController
- Defined in:
- app/lib/releaf/action_controller/richtext_attachments.rb
Instance Method Summary collapse
Instance Method Details
#create_releaf_richtext_attachment ⇒ Object
16 17 18 19 |
# File 'app/lib/releaf/action_controller/richtext_attachments.rb', line 16 def return unless params[:upload] @resource = Releaf::RichtextAttachment.create!(file_type: params[:upload].content_type, file: params[:upload]) end |
#releaf_richtext_attachment_upload_url ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/lib/releaf/action_controller/richtext_attachments.rb', line 8 def begin url_for(action: :create_releaf_richtext_attachment) rescue ::ActionController::UrlGenerationError nil end end |