module Protobuf::ActiveRecord::Persistence

Public Class Methods

new(*args, &block) click to toggle source

Override Active Record's initialize method so it can accept a protobuf message as it's attributes. :noapi:

Calls superclass method
# File lib/protobuf/active_record/persistence.rb, line 27
def initialize(*args, &block)
  args[0] = attributes_from_proto(args.first) if args.first.is_a?(::Protobuf::Message)

  super(*args, &block)
end