It’s often a security problem to display reasons for authentication failure, bit f you want to have a custom error, you should add a preparation with an after action hook to the sign in action, which checks if the user is active and returns a custom error if it is. Then you can react to that in your auth controller.
For having a relationship like you described, you can do:
has_one :something, Something do
sort inserted_at: :desc
end






















