Welcome! This page is using CodeRay 1.1.2.
We currently have
3054 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
teste |
3 lines
of
Ruby
|
37 Bytes |
Show |
Edit |
Expand |
1
2
3 |
def logged_in?
!!current_user
end |
|
Crontab |
1 line
of
Ruby
by
anuj
|
93 Bytes |
Show |
Edit |
Expand |
1 |
*/2 * * * * root /home/user/projects/trunk/script/runner -e production 'Sweeper.run'
|
|
Test Ruby |
23 lines
of
Ruby
|
401 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10
11 |
require 'uri'
class Site < ActiveRecord::Base
@@default_aaa = { :aaa => "2#{asd}323#{RA}dasd #{@dassd.to_s}", :baa => 'sasd' }
TYPE = "asds"
has_many :asdsd
d... |
|
Blah |
5 lines
of
Ruby
|
147 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5 |
<% form_tag @ticket do %>
<%= render :partial => 'form' %>
<%= submit_tag "Create" %>
<% end %> |
|
OscarScraper |
19 lines
of
Ruby
by
Juan Villa
|
591 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
require 'oscar_scraper'
scraper = OscarScraper.new
logged_in = scraper.login :sid => "90XXXXXXX",
... |
|
just a test |
11 lines
of
C
|
514 Bytes |
Show |
Edit |
Expand |
1
2
3 |
def create
@cookbook = Cookbook.new(params[:cookbook])
@cookbook.code_html = CodeRay.scan(@cookbook.code.gsub(/^\s+\n/, ''), @cookbook.category).div(:line_numbers => :list, :css => :sty... |
|
ActiveRecord sample (Ruby) |
26 lines
of
Ruby
by
Teggy
|
980 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
require 'rubygems'
require 'activerecord'
require 'pp'
ActiveRecord::Base.establish_connection :adapter => 'postgresql',
:database ... |
|
test |
4 lines
of
Plain text
|
26 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
hello
ca marche
argh
|
|
Ruby |
17 lines
of
Ruby
|
643 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
class ChangeAffiliation < Test::Unit::TestCase
def setup
$browser = Watir::IE.new
$browser.maximize()
$browser.set_fast_speed
load 'LoginControl.rb'
@outputfile =... |
|
Rails Testing |
7 lines
of
Ruby
by
Juan
|
110 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
class A < ActiveRecord::Base
acts_as_cool
def to_param
"#{self.id}-#{self.permalink}"
end
end |
|