code review

You need to factor out what actually varies between the democrat and republican blocks here. It looks like the only change is the class on the div. You have "senator-card-democrat" and "senator-card-republican". Otherwise, the blocks repeat each other. This is bad style. Remember D-R-Y - don't repeat yourself. You could have a single block without an "if" and just use senator-card-<%=  @congress_person.party %> to name your css class, or use a helper method to provide the spelled out versions or Republican and Democrat. Repeating an entire block for the sake of a one-line change is very bad form.