Sha256: 857732889954aff28e54aea3b799bc45a9a249e52d0e8cc7d346353e55d04a37

Contents?: true

Size: 368 Bytes

Versions: 2

Compression:

Stored size: 368 Bytes

Contents

require 'active_model'

class ActiveModelExample
  extend ActiveModel::Naming

  attr_reader :errors

  def initialize
    @errors = ActiveModel::Errors.new(self)
  end

  def to_model
    self
  end

  def to_key; {}; end
  def to_param; {}; end
  def valid?;      true; end
  def new_record?; true; end
  def destroyed?;  true; end
  def persisted?;  true; end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
catwalk-0.0.3 features/support/active_model_example.rb
catwalk-0.0.2 features/support/active_model_example.rb