Use only new hash syntax
This commit is contained in:
parent
3901973fd6
commit
5289f41eb5
72 changed files with 179 additions and 181 deletions
|
|
@ -4,11 +4,11 @@ class Question < ActiveRecord::Base
|
|||
belongs_to :question_type
|
||||
has_and_belongs_to_many :conferences
|
||||
|
||||
has_many :qanswers, :dependent => :delete_all
|
||||
has_many :answers, :through => :qanswers, :dependent => :delete_all
|
||||
has_many :qanswers, dependent: :delete_all
|
||||
has_many :answers, through: :qanswers, dependent: :delete_all
|
||||
|
||||
validates :title, :presence => true
|
||||
validates :answers, :presence => true
|
||||
validates :title, presence: true
|
||||
validates :answers, presence: true
|
||||
|
||||
accepts_nested_attributes_for :answers, :allow_destroy => true
|
||||
accepts_nested_attributes_for :answers, allow_destroy: true
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue