Your brake line "came loose" while riding???????????
Holy shit. New bike? Bought from Yamaha?
An old school "trick" for bleeding air from brake lines is to strap the brake lever against grip, or as close to it as you can pull it, and leave it overnight.
Use rope or something to tie the lever against grip.
_________________
2008 WR250X
Gearing: 13t - 48t
Power Commander 5 / PC-V
Airbox Door Removed - Flapper glued - AIS removed
FmF Q4
Bridgestone Battlax BT-003rs