The content-tag tag has no wiki summary.
1
vote
1answer
47 views
content_tag concatenation clean up
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 = ...
0
votes
2answers
64 views
Refactoring a HTML class collector?
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" ...