child.parent_name=new_name
child.save
end
- # PROPERTIES.TEXT_VALUE is CLOB but not VARCHAR. The operator '=' is supported by all the databases except Oracle. For this reason 'like' must be used.
- # Repeat avec me : Oracle rocks.
- Property.update_all({:text_value => new_name}, ['prop_key=? and text_value like ?', "sonar.profile.#{language}", old_name])
+ Property.with_key("sonar.profile.#{language}").each do |prop|
+ if prop.text_value==old_name
+ prop.text_value=new_name
+ prop.save
+ end
+ end
end
end
self
</td>
<td align="right" width="10%">
- <span id="activated_rules_<%= u profile.key -%>"><%= profile.active_rules.count -%></span>
+ <span id="activated_rules_<%= u profile.key -%>"><%= profile.count_active_rules -%></span>
</td>
<td align="right" width="10%"><span id="alerts_<%= u profile.key -%>"><%= profile.alerts.size -%></span></td>