下面的代码是在rhtml中的
<b><%= c_type = visible_name(c.contributable_type); icon(c.contributable_type.to_s, nil, nil, c_type, c_type) %>
改成
<b><%= c_type = visible_name(c.contributable_type); icon(c.contributable_type.to_s, nil, nil, c_type,( c_type)) %>
在蓝色的括号里做一个判断,如果目前变量c_type的值是A,就将其转化成xx,是B转化成yy,是C转化成zz
我不是是很懂rbuy语言,请大家帮忙,谢谢了!