I am trying to contact two fields and then search using ransack. I have a User model and two fields: first_name and last_name and I want to search users using full name. Here is what I am using :
ransacker :full_name do |parent|
Arel::Nodes::InfixOperation.new('||',
Arel::Nodes::InfixOperation.new('||',
parent.table[:first_name], ' '
),
parent.table[:last_name]
)
end
but I am getting this error: Unsupported argument type: String. Construct an Arel node instead. after passing the fullname into search field.