Welcome! This page is using CodeRay 1.1.2.

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

Page 267, 10 entries

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)
Bot i am 91 lines of C++ 3.09 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
namespace InfoPathFormPrinterWebService
{
    /// <summary>
    /// Represents a view in the InfoPath Form
    /// </summary>
    internal class View
    {
        private string viewName;
...
rake rails db backup 29 lines of Ruby by dan ryan 860 Bytes Show Edit Expand
1
2
3
4
5
6
7
8

namespace :db do
  # Declare some variables
  timestamp = Time.now.strftime("%Y-%m-%d")
  backup_dir = "#{RAILS_ROOT}/db"

  namespace :backup do
    desc 'Backup all the local databases de...
teste 13 lines of ERb by Brando 241 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
<% form_for(@post) do |f| %>
  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :body %><br />
    <%= f.text_area :body %>
  </p>
  <p>
   ...
edit 6 lines of Ruby 177 Bytes Show Edit Expand
1
2
3
4
5
6
  # GET /news_items/1;edit
  def edit
    @news_item = NewsItem.find(params[:id])
    @all_districts = District.find(:all)
    @all_crime_types = CrimeType.find(:all)
  end

Page 267, 10 entries