Ragwort and tansy have pretty flowers. The problem is that they are noxious plants. Noxious is a term used to mean that they are poisonous to certain animals and people.
There are a lot of names for ragwort. One name, commonly used in the US is tansy ragwort. This isn’t good, because tansy is sometimes used in food and ragwort would be poisonous.  Tansy should not be eaten. It isn’t safe to do so.
I have pictures of both plants to show you. They don’t look alike close up, but they both have bright yellow flowers.

The pictures are from Wikimedia Commons.

Illustration of ragwort  by, Carl Axel Magnus Lindman  1856 – 1928.

382px-Illustration_Senecio_jacobaea Carl Axel Magnus Lindman 1856  1928 WCIllustration of tansy, found by Kurt Stuber.

348px-Illustration_Tanacetum_vulgare0  Kurt Stuber  WC from old drawingClose up of ragwort flowers  by, Strobilmyces.

634px-Senecio_jacobaea_20070603w Strobilomyces   WCClose up of tansy flowers  by, Roger Griffith.

640px-Close_up_of_Tanacetum_vulgare_flower_head Roger Griffith WCRagwort plant where you can see the leaves  by, User: rasbak.

473px-Jacobskruiskruid_in_voorjaar_na_bloei_vorig_jaar_(Jacobaea_vulgaris) User Rasbak WCTansy leaves  by, Kirsten Peters.

Tanacetum_vulgare_blatt Kristian Peters WCRagwort plant in bloom  by, Christian Fischer.

398px-SenecioJacobaeaJacobaea Christian Fischer WCThis last picture is of tansy plants in bloom  by, Georg Slickers.

Georg Sliker