Sha256: e2415b316d70e92dbbfadcb9d1ccc95d601f12e5dd7a4af47ff663e79b930ce2

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

class Book < ActiveRecord::Base
  attr_accessible :title, :exemplars, :digitized, :notes, :tags, :rating, :author_id, :last_read_at, :published_on
  belongs_to :author
  validates_presence_of :title

  scope :sorted_by_author_name, lambda { |dir| joins(:author).order("authors.first_name #{dir}, authors.last_name #{dir}") }

  attr_protected :exemplars, :author_id, :as => :user

  def read_only_virtual_attr
    "Dummy value"
  end

  def assignable_virtual_attr=(value)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
netzke-basepack-0.8.4 test/basepack_test_app/app/models/book.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/models/book.rb