It goes both ways. Positive situations are attributed to merit and abilities (I work hard, I have grit, I'm disciplined) while negative situations are attributes to the environment (the gym was too crowded, there's only fast food places near my house).