Sha256: 898d3321f40e31f8f106e5bc2c1b95d0318dc5a108ebd833d9da1bf8499d3bf2
Contents?: true
Size: 589 Bytes
Versions: 35
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module Decidim module Messaging # A form object to be used when users want to message another user. class ConversationForm < Decidim::Form mimic :conversation attribute :body, String attribute :recipient_id, Integer validates :body, :recipient, presence: true def recipient @recipient ||= Decidim::User .where.not(id: current_user.id) .where(organization: current_user.organization) .find_by(id: recipient_id) end end end end
Version data entries
35 entries across 35 versions & 1 rubygems