Module: ActiveRecord::VirtualBase::TablelessInstanceMethods

Defined in:
lib/galaxy/virtual_base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_record?Boolean

Returns:

  • (Boolean)


158
159
160
# File 'lib/galaxy/virtual_base.rb', line 158

def self.new_record?
  false
end

Instance Method Details

#create_or_updateObject



151
152
153
# File 'lib/galaxy/virtual_base.rb', line 151

def create_or_update
  errors.empty?
end

#saved!(with_id = 1) ⇒ Object Also known as: exists!



155
156
157
158
159
160
161
# File 'lib/galaxy/virtual_base.rb', line 155

def saved!(with_id = 1)
  self.id = with_id
  
  def self.new_record?
    false
  end
end