<commit_before>module SocialStream
  module Controllers
    module Authorship
      extend ActiveSupport::Concern

      included do
        before_filter :set_author_ids, only: [ :new, :create ]
      end

      private

      def set_author_ids
        resource_params.first[:author_id] = current_subject.try(:actor_id)
        resource_params.first[:user_author_id] = current_user.try(:actor_id)
      end
    end<commit_msg>Add owner_id to authorship params<commit_after>module SocialStream
  module Controllers
    module Authorship
      extend ActiveSupport::Concern

      included do
        before_filter :set_author_ids, only: [ :new, :create ]
      end

      private

      def set_author_ids
        resource_params.first[:author_id]      = current_subject.try(:actor_id)
        resource_params.first[:user_author_id] = current_user.try(:actor_id)
        resource_params.first[:owner_id]       ||= current_subject.try(:actor_id)
      end
    end
{'fraction_non_alphanumeric': 0.07580477673935618, 'fraction_numerical': 0.0, 'mean_word_length': 3.0334728033472804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4962', 'n_tokens_mistral': 286, 'n_tokens_neox': 279, 'n_words': 55}