Sha256: 907cdd41ad72b4b8177f2ff6e4c25c03b1b21cb1f777907e4a7cf96f213ef9be

Contents?: true

Size: 257 Bytes

Versions: 2

Compression:

Stored size: 257 Bytes

Contents

class <%= role_class %>
  include DataMapper::Resource
  
  def self.named role_names 
    where(:name.in => role_names.flatten)
  end

  property :id, Serial
  property :name, String

  validates_uniqueness_of :name

  extend RoleClass::ClassMethods
end  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
roles_data_mapper-0.3.1 lib/generators/data_mapper/roles/templates/one_role/role.rb
roles_data_mapper-0.3.0 lib/generators/data_mapper/roles/templates/one_role/role.rb