Sha256: becfa7ab69744a505b027f90eb45d17a08b90926f35064b98d4fcc142d495f72

Contents?: true

Size: 505 Bytes

Versions: 16

Compression:

Stored size: 505 Bytes

Contents

require 'rubygems'
require 'active_record'

class CreateEntries < ActiveRecord::Migration
  def self.up
    create_table "entries", :force => true do |t|
      t.column :title, :string, :limit => 100
      t.column :updated_on, :datetime
      t.column :content, :text
      t.column :rating, :decimal, :precision => 10, :scale => 2
    end
  end

  def self.down
    drop_table "entries"
  end
end

class Entry < ActiveRecord::Base
  def to_param
    "#{id}-#{title.gsub(/[^a-zA-Z0-9]/, '-')}"
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
saturnflyer-activerecord-jdbc-adapter-0.9.3 test/models/entry.rb
kb-activerecord-jdbc-adapter-0.9.7.1-java test/models/entry.rb
kb-activerecord-jdbc-adapter-1.0.0.beta1-java test/models/entry.rb
activerecord-jdbc-adapter-1.0.0.beta1-java test/models/entry.rb
activerecord-jdbc-adapter-0.9.7-java test/models/entry.rb
activerecord-jdbc-adapter-0.9.6-java test/models/entry.rb
activerecord-jdbc-adapter-0.9.5-java test/models/entry.rb
activerecord-jdbc-adapter-0.9.4-java test/models/entry.rb
activerecord-jdbc-adapter-0.9.3-java test/models/entry.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.6 test/models/entry.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.5 test/models/entry.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.4 test/models/entry.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.3 test/models/entry.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.2 test/models/entry.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.1 test/models/entry.rb
activerecord-jdbc-adapter-0.9.2 test/models/entry.rb