Sha256: 032200fadf4933eb3f77d00f85b3df3e7db96d72af4134547789238b5cac8ace
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
require 'active_record' class GenericPolymorphic extend ActiveModel::Naming extend ActiveModel::Translation include ActiveModel::Validations include ActiveModel::Conversion attr_accessor :id, :some_attribute, :polymorphicable_type, :polymorphicable_id def initialize(attributes) self.id = attributes[:id] self.some_attribute = attributes[:some_attribute] self.polymorphicable_type = attributes[:polymorphicable_type] self.polymorphicable_id = attributes[:polymorphicable_id] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
api_url_generator-0.1.0 | test/models/generic_polymorphic_klass.rb |