Sha256: 5ee4d9c2625fcee6a3b78530b47b5dd3611cfe5358d14e3201ce0e569a39dab5
Contents?: true
Size: 260 Bytes
Versions: 5
Compression:
Stored size: 260 Bytes
Contents
class <%= model_name %> < ActiveRecord::Base attr_accessible :name, :abbreviation validates :name, uniqueness: {scope: :abbreviation} scope :for_abbreviation, ->(abbrev){where(abbreviation: abbrev)} scope :for_name, ->(name){where(name: name)} end
Version data entries
5 entries across 5 versions & 1 rubygems