Sha256: 373a960921434c81adb9be3b18f949a7d5a0500ab6efc239666a315bd35f5a76
Contents?: true
Size: 575 Bytes
Versions: 8
Compression:
Stored size: 575 Bytes
Contents
class RubySyncOperation < ActiveRecord::Base belongs_to :event, :class_name => "RubySyncEvent", :foreign_key => "ruby_sync_event_id" has_many :values, :class_name => "RubySyncValue", :foreign_key => "ruby_sync_operation_id" def self.create_for record, type record.class.content_columns.map do |column| values = [ RubySyncValue.new(:value=>record[column.name].to_s) ] RubySyncOperation.new :operation=>type, :field_name=>column.name, :values=>values end end end
Version data entries
8 entries across 8 versions & 1 rubygems