Welcome! This page is using CodeRay 1.1.2.
We currently have
3049 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
Sample Snippet |
8 lines
of
ERb
by
Nick
|
580 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
<div id="review-item-%item_id%" class="review-item">
<h3><a href="%item_link%">%item_title</a></h3>
<div id="review-item-content-%item_id%" class="review-item-content">%item_review%</div>
<di... |
|
puts "hello world" |
1 line
of
C
|
18 Bytes |
Show |
Edit |
Expand |
|
PbdtIWSK |
1 line
of
Ruby
by
RnqJNXvQSeLAEOUrKB
|
13 Bytes |
Show |
Edit |
Expand |
|
Spaaam! |
1 line
of
ERb
by
Devyn
|
26 Bytes |
Show |
Edit |
Expand |
1 |
<b>This is spaaaaaaam!</b> |
|
lambda with inner join |
4 lines
of
Ruby
by
Tony Perrie
|
464 Bytes |
Show |
Edit |
Expand |
1
2 |
lambda { |objs| { :select => "domain_objects.*, count(links.from_id) AS object_count",
:conditions => objs.inject("TRUE") { |str,obj| str + " OR ( links.object_value.id = '#... |
|
yahoo |
5 lines
of
Ruby
by
me
|
797 Bytes |
Show |
Edit |
Expand |
|
Named Scope Example with Lambda and Group By Having |
5 lines
of
Ruby
by
Tony Perrie
|
368 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
named_scope :linked_to,
lambda { |ovs| { :select => "domain_objects.*, count(links.from_id) AS object_count",
:conditions => [ "links.object_value_id IN (?)", ovs ],
... |
|
http://judofyr.net/posts/morse.html |
55 lines
of
Ruby
by
Magus Holm
|
2.22 KB |
Show |
Edit |
Expand |
1
2
3
4
5 |
module Morse
A,B,C=proc{M.tr(' ','').gsub(/#{$/}+/,$/).split($/).map{|x|
x[/(.)(.+)(.).*\1\2\3/,2].to_i(16)}},proc{|c|A[][c-65].to_s(2
)[1..-1].tr('10','-.')},proc{|m|(... |
|
groups test |
8 lines
of
Ruby
by
anon
|
120 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
class GroupsController < ApplicationController
helper Ziya::Helper
def index
@group = nil;
end
end |
|
Random Ruby Class |
8 lines
of
Ruby
|
256 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
class ApplicationController < ActionController::Base
session :session_key => '_tags2_session_id'
require 'string_mi... |
|