Newer
Older
dmpopidor / app / models / question_format.rb
@briley briley on 20 Dec 2016 359 bytes added unit tests for question format
class QuestionFormat < ActiveRecord::Base
  attr_accessible :title, :description, :as => [:default, :admin]

  #associations between tables
  has_many :questions
  
  validates :title, presence: true, uniqueness: true
  
  ##
  # gives the title of the question_format
  #
  # @return [String] title of the question_format
  def to_s
    "#{title}"
  end

end