I am new at ruby and using devise_invitable gem for invitations. Every instruction is sending properly. Now i want to add a custom subject which will have an invitee name and board name and custom content which will have same things as subject. How can i do this in following action method without using extra custom code etc?
def AddMember
board = current_user.boards.find(params[:id])
# simply invite user !
invitee=User.invite!({:email => (params[:email])}, current_user)
board.members << User.find_by_email(params[:email])
msg = "invitation sent"
render json: msg,status: :ok
return
end
msg = "some error occured - member adding failed"
render json: msg,status: 500
end