Sha256: 85985a83b182bb782ed895fe0c6f7c98023afbf59a726fa91ed4f4db6bd1be5c

Contents?: true

Size: 187 Bytes

Versions: 16

Compression:

Stored size: 187 Bytes

Contents

class Ball < ActiveRecord::Base
  attr_accessible :color

  validates_presence_of :color, :on => :create

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

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
rails_admin-0.4.9 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.8 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.7 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.6 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.5 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.4 spec/dummy_app/app/active_record/ball.rb
rails_admin-lbgraham-0.4.2 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.3 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.2 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.1 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.4.0 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.3.0 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.2.0 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.1.2 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.1.1 spec/dummy_app/app/active_record/ball.rb
rails_admin-0.1.0 spec/dummy_app/app/active_record/ball.rb