I need to concatenate two content_tag and it works but it seems a little messy to me. Any thoughts on how may I refactor this? def format_price(money) mny = get_price_string(money).to_money str = ...
I have following HTML class collector. Is there a better way than tap for this? def tr_classes(user) classes = .tap do |c| c << "error" if user.company.nil? c << "disabled" ...