app/concepts/assignable/common_side_effects.rb
# Side-Effect: iterate organizations and create assignments for
# translations
Side-Effect: iterate organizations and create assignments for
translations
Side - Effect : iterate organizations and create assignments for translations
def create_optional_assignment_for_organization_translation!(
        options, model:, current_user:, **
      )
        return true unless model.offer && model.offer.visible_in_frontend?
        model.offer.organizations.visible_in_frontend.map do |orga|
          orga.translations.map do |translation|
            if translation.manually_editable?
              create_new_assignment_if_assignable_should_be_reassigned!(
                options, model: translation, current_user: current_user
              )
            else
              true
            end
          end.all? 
        end.all? 
      end
def create_optional_assignment_for_organization_translation! ( options , model : , current_user : , ** ) return true unless model . offer && model . offer . visible_in_frontend? model . offer . organizations . visible_in_frontend . map do | orga | orga . translations . map do | translation | if translation . manually_editable? create_new_assignment_if_assignable_should_be_reassigned! ( options , model : translation , current_user : current_user ) else true end end . all? end . all? end
Side-Effect: iterate organizations and create assignments for
translations
Side - Effect : iterate organizations and create assignments for translations
# NOTE: problem? # NOTE: u mad bro?
options
<not_specific>
model
<not_specific>
current_user
<not_specific>