Sha256: 065843cd249e2e796c86bd8433b2069c35a28222823842246d1408c348003d7c

Contents?: true

Size: 204 Bytes

Versions: 6

Compression:

Stored size: 204 Bytes

Contents

class Author
  include GdatastoreMapper::Base

  attr_accessor :name

  has_many :books

  validates :name, presence: true

  def delete_books
    books.each do |book|
      book.delete
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gdatastore_mapper-0.1.8 rails_example/app/models/author.rb
gdatastore_mapper-0.1.7 rails_example/app/models/author.rb
gdatastore_mapper-0.1.6 rails_example/app/models/author.rb
gdatastore_mapper-0.1.5 rails_example/app/models/author.rb
gdatastore_mapper-0.1.4 rails_example/app/models/author.rb
gdatastore_mapper-0.1.3 rails_example/app/models/author.rb