app/controllers/works_controller.rb
# if we are importing for others, we need to send invitations
if we are importing for others, we need to send invitations
if we are importing for others we need to send invitations
def send_external_invites(works)
    return unless params[:importing_for_others]
    @external_authors = works.collect(&:external_authors).flatten.uniq
    if !@external_authors.empty?
      @external_authors.each do |external_author|
        external_author.find_or_invite(current_user)
      end
      message = " " + ts("We have notified the author(s) you imported works for. If any were missed, you can also add co-authors manually.")
      flash[:notice] ? flash[:notice] += message : flash[:notice] = message
    end
  end
def send_external_invites ( works ) return unless params [ :importing_for_others ] @external_authors = works . collect ( & :external_authors ) . flatten . uniq if ! @external_authors . empty? @external_authors . each do | external_author | external_author . find_or_invite ( current_user ) end message = " " + ts ( "We have notified the author(s) you imported works for. If any were missed, you can also add co-authors manually." ) flash [ :notice ] ? flash [ :notice ] += message : flash [ :notice ] = message end end
if we are importing for others, we need to send invitations
if we are importing for others we need to send invitations
works