Sha256: 3b4e695df25d5c2621f5a20948e39a0ffe683ff5a6a695a12ff116adbb3b311c

Contents?: true

Size: 161 Bytes

Versions: 2

Compression:

Stored size: 161 Bytes

Contents

class Ball < ActiveRecord::Base
  validates_presence_of :color, :on => :create

  def to_param
    color.present? ? color.downcase.gsub(" ", "-") : id
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_admin-0.6.0 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.5.0 spec/dummy_app/app/active_record/ball.rb