Skip to Content Skip to Search
Methods
B
U

Instance Public methods

build_member(attributes)

# File engines/member/app/actions/member/content_search/scope/cast_results.rb, line 5
def build_member(attributes)
  member_attributes = aliased_members_columns_mapping.map { |(aliased, attr)|
    [attr, attributes[aliased]]
  }.to_h

  DB::Member.new(member_attributes)
end

unroll_content_ids(attributes)

# File engines/member/app/actions/member/content_search/scope/cast_results.rb, line 13
def unroll_content_ids(attributes)
  rolled_up = attributes["content_keys"].to_s
  rolled_up.split(key_separator).map do |model_and_key|
    model, id = model_and_key.split(key_delimiter)
    {model: model.strip, id: id.strip.to_i}
  end
end