Split up the font size calculation

The font size is a view concern, but the relative size belongs in the
model layer.
This commit is contained in:
Katrina Owen 2013-03-02 07:14:52 -05:00
parent f375c06964
commit 3f496db4b4
4 changed files with 12 additions and 7 deletions

View file

@ -9,7 +9,7 @@
tag_cloud.tags.each do |t|
%><%=
link_to t.name, tag_path(t.name), {
:style => "font-size: " + "#{tag_cloud.font_size(t)}pt",
:style => "font-size: " + "#{font_size(tag_cloud, t)}pt",
:title => "#{t.count} #{t('common.actions_midsentence', :count => t.count)}"}
-%><%
end