Sha256: b0f658c8b8ed0478e3a7d1e5c5063495236a53f068c903e3c346369ed522388e
Contents?: true
Size: 264 Bytes
Versions: 3
Compression:
Stored size: 264 Bytes
Contents
module ActsInRelation module Action def define class_object.class_eval <<-RUBY belongs_to :"#{source}" belongs_to :"target_#{target}", class_name: "#{target.capitalize}", foreign_key: :"target_#{target}_id" RUBY end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
acts_in_relation-0.1.1 | lib/acts_in_relation/action.rb |
acts_in_relation-0.1.0 | lib/acts_in_relation/action.rb |
acts_in_relation-0.0.1 | lib/acts_in_relation/action.rb |