Sha256: 8b9e6166b3b2039f66e0e8f51081c169bf63197ed6b75f643a7c853ca2e5ee18

Contents?: true

Size: 173 Bytes

Versions: 30

Compression:

Stored size: 173 Bytes

Contents

class Book < ActiveRecord::Base
  belongs_to :genre
  
  virtual_column :recent => {:read_only => true}
  
  def recent
    updated_at > 1.hour.ago ? "Yes" : "No"
  end
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
skozlov-netzke-basepack-0.1.0.1 test/app_root/app/models/book.rb
skozlov-netzke-basepack-0.1.0 test/app_root/app/models/book.rb
skozlov-netzke-basepack-0.1.1.1 test/app_root/app/models/book.rb
skozlov-netzke-basepack-0.1.1.2 test/app_root/app/models/book.rb
skozlov-netzke-basepack-0.1.1 test/app_root/app/models/book.rb
skozlov-netzke_basepack-0.1.0 test/app_root/app/models/book.rb
skozlov-netzke_core-0.1.0 test/app_root/app/models/book.rb
netzke-basepack-0.1.2.1 test/app_root/app/models/book.rb
netzke-basepack-0.1.2 test/app_root/app/models/book.rb
netzke-basepack-0.1.3 test/app_root/app/models/book.rb
netzke-basepack-0.1.3.1 test/app_root/app/models/book.rb
netzke-basepack-0.1.4.1 test/app_root/app/models/book.rb
netzke-basepack-0.3.3.1 test/app_root/app/models/book.rb
netzke-basepack-0.3.4 test/app_root/app/models/book.rb
netzke-basepack-0.3.5 test/app_root/app/models/book.rb
netzke-basepack-0.3.6 test/app_root/app/models/book.rb
netzke-basepack-0.3.3 test/app_root/app/models/book.rb
netzke-basepack-0.3.10 test/app_root/app/models/book.rb
netzke-basepack-0.3.1 test/app_root/app/models/book.rb
netzke-basepack-0.3.0 test/app_root/app/models/book.rb