Sha256: 5f84164d6e39b0522b163f8eb21d0481fa970ed23af62dbef5b93c0e6ed98ff4

Contents?: true

Size: 458 Bytes

Versions: 12

Compression:

Stored size: 458 Bytes

Contents

module Rubix
  module Associations

    module BelongsToAction

      def action= a
        return unless a
        @action    = a
        @action_id = a.id
      end

      def action
        @action
      end

      def action_id= aid
        return unless aid
        @action_id = aid
      end

      def action_id
        return @action_id if @action_id
        return unless @action
        @action_id = @action.id
      end

    end
  end
end

      

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rubix-0.5.14 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.13 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.9 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.8 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.7 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.6 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.5 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.4 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.3 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.2 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.1 lib/rubix/associations/belongs_to_action.rb
rubix-0.5.0 lib/rubix/associations/belongs_to_action.rb