Welcome! This page is using CodeRay 1.1.1.

We currently have 2670 rays in the database.
You can add a New Ray or browse the posted rays by pages.

Page 263, 10 entries

Test 8 lines of Ruby by test 262 Bytes Show Edit Expand
1
2
3
4
5
6
  def population
    @cities = City.find(:all)
    @population_data_link = formatted_population_reports_url(:xml)
    respond_to do |format|
      format.html
      format.xml  { render :actio...
ActionController layout 0 lines of ERb 0 Bytes Show Edit Expand
1
ActionController layout 3 lines of Ruby 82 Bytes Show Edit Expand
1
2
3
// The header part of this layout
<%= yield %>
// The footer part of this layout
test long line 3 lines of Ruby by flyerhzm 46 Bytes Show Edit Expand
1
2
3
def test
  puts "there is no long text."
end
here 26 lines of Ruby 639 Bytes Show Edit Expand
1
2
3
4
5
6
7
class User < ActiveRecord::Base
  has_one :profile 
  has_and_belongs_to_many :channels, 
  :join_table => "channel_subscriptions"
  has_many :clips_owner,
  :class_name => "Clip",
  :foreign...
Here 15 lines of Ruby 311 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
# == Schema Information
# Schema version: 20080506190612
#
# Table name: formats
#
#  id   :integer(11)     not null, primary key
#  name :string(255)
#

class Format < ActiveRecord::Base
...
blah 6 lines of Ruby 286 Bytes Show Edit Expand
1
2
3
4
  def children(limit = nil)
    found  = articles.find(:all, :limit => limit, :order => 'updated_at desc')
    found += pages.find(:all, :limit => limit, :order => 'updated_at desc')
    found.s...
intro 3 lines of Ruby 35 Bytes Show Edit Expand
1
2
3
def intro
  puts 'Railscasts'
end
Mongrel test 6 lines of Ruby 148 Bytes Show Edit Expand
1
2
3
4
5
6
Mongrel::Configurator.new do
    listener :port => 2000 do
         uri "/recordings/", :handler => StreamHandler.new
    end
    run; join
end
test 11 lines of Ruby by tester 162 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
Just want to see what this does to normal text - I have to make sure it works.

def test(one)
  puts one
end

1.upto(9) |n|
  puts n
end

puts test(1)

Page 263, 10 entries