Sha256: 7d910c30e0a6a93988976365d3ac15766c4325b946bbab8fb99705261cdd8692

Contents?: true

Size: 460 Bytes

Versions: 7

Compression:

Stored size: 460 Bytes

Contents

def new_card?
  new_record? || # not yet in db (from ActiveRecord)
    !!@from_trash    # in process of restoration from trash, not yet "re-created"
end
alias_method :new?, :new_card?

def known?
  real? || virtual?
end

def real?
  !new_card?
end

def unknown?
  !known?
end

def pristine?
  # has not been edited directly by human users.  bleep blorp.
  new_card? || !actions.joins(:act).where(
    "card_acts.actor_id != ?", Card::WagnBotID
  ).exists?
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
card-1.19.6 mod/core/set/all/states.rb
card-1.19.5 mod/core/set/all/states.rb
card-1.19.4 mod/core/set/all/states.rb
card-1.19.3 mod/core/set/all/states.rb
card-1.19.2 mod/core/set/all/states.rb
card-1.19.1 mod/core/set/all/states.rb
card-1.19.0 mod/core/set/all/states.rb