1 2 3 4
def split_in_groups(values, cols=4) cols.downto(1) do |col| group_size = (values.size / col.to_f).ceil - 1 ...
Ruby On split_in_groups instead of ...
by JohnnyBusca,
November 28, 2007 20:57
The example shown above ret...
1 2 3 4
<% col_size = (friends.size/4.0).ceil %> <% friends.in_groups_of(col_size, false) do |group| %> <div class=‘list‘> ...
Ruby split_in_groups instead of ...
I would like to have a piec...
1
puts "#{show_value_or_default(@me, "JohnnyBusca",&:name)} is very happy!"
Ruby On Show a default value if obj...
by JohnnyBusca,
October 04, 2007 06:41
Thanks very much.. I wanted...
1 2 3 4
# this method returns a default when the object does not exist or the value given in the block does not exist. # # Example: ...
Ruby Show a default value if obj...
by JohnnyBusca,
October 03, 2007 00:48,
4 refactorings
Often in the view you want ...
I had a some similar in htt...