Sha256: 6515926571d3e19acc41fc1360ac816074c446d362f271a5a3afe6845a9875ff

Contents?: true

Size: 300 Bytes

Versions: 2

Compression:

Stored size: 300 Bytes

Contents

module Rapidfire
  class Attempt < ApplicationRecord
    belongs_to :survey
    has_many   :answers, inverse_of: :attempt, autosave: true

    if Rails::VERSION::MAJOR >= 5
      belongs_to :user, polymorphic: true, optional: true
    else
      belongs_to :user, polymorphic: true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rapidfire-8.0.0 app/models/rapidfire/attempt.rb
rapidfire-5.0.0 app/models/rapidfire/attempt.rb