This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="left-main"> | |
<p class="original-site">RECENT DESIGNS</p> | |
<% @articles.each.with_index do |article, i| %> | |
<% if i % 4 == 0 %> | |
<%= link_to(image_tag(article.main_image_url.to_s), article, {:class => 'dock-item'}) %> | |
<% else %> | |
<%= link_to(image_tag(article.main_image_url.to_s), article, {:class => 'dock-item2'}) %> | |
<% end %> | |
<% end %> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test/unit/assertions' | |
include Test::Unit::Assertions | |
assert_equal "1.9.2", RUBY_VERSION | |
# A Ruby meta-programming puzzle for polite programmers. | |
# This puzzle was created by Matt Wynne (@mattwynne) on 2011-04-10 inspired by Jim Weirich's | |
# talk at the Scottish Ruby Conference 2011. | |
# | |
# The challenge is: you have a class Foo which you want to monkey-patch, but politely. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% clients = @clients.select { |c| c.clientID == 2 } %> | |
<%= clients.map(&:clientID) %> |