Sha256: 4766bdd49d904e5b25fc79286920ae2bbe55742fa482bec511f9f2a878e498db

Contents?: true

Size: 284 Bytes

Versions: 76

Compression:

Stored size: 284 Bytes

Contents

class Papel < ActiveRecord::Base
  has_many :usuarios
  has_many :permissoes, dependent: :destroy
  validates_presence_of :descricao, :nome, :chave
  validates_uniqueness_of :chave

  accepts_nested_attributes_for :permissoes, allow_destroy: true

  def to_s
    self.nome
  end

end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
templus_models-3.0.21 test/dummy/app/models/papel.rb
templus_models-3.0.20 test/dummy/app/models/papel.rb
templus_models-3.0.19 test/dummy/app/models/papel.rb
templus_models-3.0.17 test/dummy/app/models/papel.rb
templus_models-2.0.16 test/dummy/app/models/papel.rb
templus_models-1.6.9 test/dummy/app/models/papel.rb
templus_models-2.0.15 test/dummy/app/models/papel.rb
templus_models-3.0.14 test/dummy/app/models/papel.rb
templus_models-2.0.14 test/dummy/app/models/papel.rb
templus_models-2.0.12 test/dummy/app/models/papel.rb
templus_models-3.0.13 test/dummy/app/models/papel.rb
templus_models-3.0.12 test/dummy/app/models/papel.rb
templus_models-2.0.11 test/dummy/app/models/papel.rb
templus_models-2.0.9 test/dummy/app/models/papel.rb
templus_models-2.0.8 test/dummy/app/models/papel.rb
templus_models-3.0.10 test/dummy/app/models/papel.rb
templus_models-1.6.8 test/dummy/app/models/papel.rb
templus_models-1.6.7 test/dummy/app/models/papel.rb
templus_models-3.0.9 test/dummy/app/models/papel.rb
templus_models-2.0.7 test/dummy/app/models/papel.rb