Sha256: 903e2d207116b745d5493911b6c9357ebb7e2d01318de5baee96c518431f2530

Contents?: true

Size: 326 Bytes

Versions: 3

Compression:

Stored size: 326 Bytes

Contents

module ActsInRelation
  module Roles
    class Action < Base
      def define
        @class.class_eval <<-RUBY
          belongs_to :"#{source}"

          belongs_to :"target_#{target}",
            class_name: "#{target.capitalize}",
            foreign_key: :"target_#{target}_id"
        RUBY
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acts_in_relation-0.2.2 lib/acts_in_relation/roles/action.rb
acts_in_relation-0.2.1 lib/acts_in_relation/roles/action.rb
acts_in_relation-0.2.0 lib/acts_in_relation/roles/action.rb